Problem8569--CGL_7_I : Area of Intersection between Two Circles

8569: CGL_7_I : Area of Intersection between Two Circles

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB  Special Judge

Description

Write a program which prints the area of intersection between given circles $c_1$ and $c_2$.

Input

The input is given in the following format.
c1x c1y c1r
c2x c2 yc2r
c1x, c1y and c1r represent the coordinate and radius of the first circle. c2x, c2y and c2r represent the coordinate and radius of the second circle. All input values are given in integers.

Output

Output the area in a line. The output values should be in a decimal fraction with an error less than 0.000001.

Constraints

−10,000≤c1x,c1y,c2x,c2y≤10,000
1≤c1r,c2r≤10,000

Sample 1 Input

0 0 1
2 0 2

Sample 1 Output

1.40306643968573875104

Sample 2 Input

1 0 1
0 0 3

Sample 2 Output

3.14159265358979311600

HINT

相同题目:CGL_7_I

Source/Category