While examining molecular structures in a biology lab, you notice a curious interaction: whenever two circular molecules collide, they fuse at their point of contact and overlap.
Given two such circular molecules, your task is to compute the area of their overlapping region (highlighted in the diagram).
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 |