In a biological lab, you were examining some of the molecules. You got some interesting behavior about some of the molecules. There are some circular molecules, when two of them collide, they overlap with each other, and it's hard to find that which one is over the other one.
Given two molecules as circles, you have to find the common area of the given molecules which is shaded in the picture.
Input
Input starts with an integer T (≤ 12), denoting the number of test cases.
Each case contains six integers x1, y1, r1 and x2, y2, r2. Where (x1, y1) is the center of the first molecule and r1 is the radius and (x2, y2) is the center of the second molecule and r2 is the radius. Both the radii are positive. No integer will contain more than 3 digits.
Output
For each test case, print the case number and the common area of the given molecules. Errors less than 10-6 will be ignored.
Sample
Sample Input | Sample Output |
---|---|
3 0 0 10 15 0 10 -10 -10 5 0 -10 10 100 100 20 100 110 20 | Case 1: 45.3311753978 Case 2: 35.07666099 Case 3: 860.84369 |