Bridge Across Islands
Thousands of thousands years ago there was a small kingdom located in the middle of the Pacific Ocean. The territory of the kingdom consists two separated islands. Due to the impact of the ocean current, the shapes of both the islands became convex polygons. The king of the kingdom wanted to establish a bridge to connect the two islands. To minimize the cost, the king asked you, the bishop, to find the minimal distance between the boundaries of the two islands.
Input
Consists of several test cases. Each test case starts with two integers n and m (3 ≤ n, m ≤ 10000). Each of the next n lines contains a pair of coordinates, which describes the position of a vertex in one convex polygon. Each of the next m lines contains a pair of coordinates, which describes the position of a vertex in the other convex polygon. A line with n = m = 0 indicates the end of input. The coordinates are within the range [-10000, 10000].
Output
For each test case output the minimal distance. An error within 0.001 is acceptable.