Grazing Goats (Small)

Each of the two disks centered at the poles must cover the bucket point, and the answer is the overlap area of the smallest such disks.

Easy3GeometryMathNo attempts yetTime limit5sMemory limit512 MB

Problem

Farmer John has brought in NN goats. Goat ii is tied to a pole at position PiP_i with a rope of length LiL_i, so goat ii can go anywhere within distance LiL_i of the point PiP_i and nowhere else. The field is large and flat, so treat it as an infinite plane.

The pole positions are already fixed, and Farmer John only has to pick the rope lengths. Two things make that choice awkward.

  • Every goat has to reach a single water bucket. Farmer John has not decided where the bucket goes, but he has narrowed the choice down to Q1,Q2,,QMQ_1, Q_2, \dots, Q_M.
  • The goats are ill tempered and fight noisily when they end up in the same spot. Farmer John therefore wants the area AA that every goat can reach to be as small as possible.

For each bucket position QjQ_j, pick rope lengths that minimize the area AjA_j reachable by every goat, then compute that AjA_j.

The picture below shows a field with four poles. The four blue points are the pole positions P1,P2,P3,P4P_1, P_2, P_3, P_4 and the two red points are the candidate bucket positions Q1Q_1 and Q2Q_2. The two shaded regions have areas A1A_1 and A2A_2. In this problem there are always two poles.

Four poles, two candidate bucket positions, and the two shaded regions

Input

The first line contains the number of test cases TT. The first line of each test case contains the integers NN and MM.

The next NN lines contain the pole positions P1,P2,,PNP_1, P_2, \dots, P_N, one per line, followed by MM lines containing the bucket positions Q1,Q2,,QMQ_1, Q_2, \dots, Q_M, one per line. Each of these N+MN + M lines contains the xx and yy coordinate of that point, separated by a single space.

Limits

  • Every coordinate is an integer between 1000-1\,000 and 10001\,000.
  • Within one test case the N+MN + M points are distinct and no three of them lie on one line.
  • 1T1001 \le T \le 100
  • N=2N = 2
  • 1M101 \le M \le 10

Output

For each test case, print one line in the form Case #x: A1 A2 ... AM, where xx is the test case number starting from 11 and AjA_j is the area defined above.

Round every area and always print four digits after the decimal point, separating the values with a single space. For example, print 0.2939 for an area of 0.29394400.2939440 and 10.7080 for an area of 10.70810.708.