Once there was a country named Ajobdesh. One of the architects designed a race track in a famous stadium in that country.
The stadium was like a polygon. The architect made another polygon inside that stadium and the space in between the two polygons was the track. Unlike other countries their cars were circular.
Now you are asked to find the radius of the largest car that can complete the track. Or you can say that the car can move freely around the track.
Input
Input starts with an integer T (≤ 20), denoting the number of test cases.
Each case starts with a line containing an integer n (3 ≤ n ≤ 100) denoting the number of vertices of the polygon that was made by the architect. Each of the next n lines contains two integers xi yi denoting the co-ordinates of that polygon.
The next line contains an integer m (3 ≤ m ≤ 100) denoting the number of vertices of the polygon that formed the stadium. Each of the next m lines contains two integers xi yi denoting the co-ordinates of that polygon.
All coordinates have absolute value no larger than 1000. The points of the polygons can be given in either clockwise or counterclockwise order and the two polygons do not intersect or touch themselves or each other. The outer polygon encloses the inner polygon.
Output
For each case, print the case number and the radius of the largest car that can complete the track. Errors less than 10-6 will be ignored.
Sample
Sample Input | Sample Output |
---|---|
1 3 0 0 1 0 1 1 5 3 -3 3 3 -4 2 -1 -1 -2 -2 | Case 1: 0.7071067812 |