Tianjin University Online Judge
Contests Virtual Contests Problems Submit Runs Status Rank List Forum

1754.   Circular Area
Time Limit: 1.0 Seconds   Memory Limit: 65536K
Total Runs: 902   Accepted Runs: 322    Multiple test files



Your task is to write a program, which, given two circles, calculates the area of their intersection with the accuracy of three digits after decimal point.

Input

In the single line of input file there are space-separated real numbers x1 y1 r1 x2 y2 r2. They represent center coordinates and radii of two circles.

Output

The output file must contain single real number - the area rounded to three decimal places.

Sample Input

20.0 30.0 15.0 40.0 30.0 30.0

Sample Output

608.366



Source: Northeastern Europe 2000 Far-Eastern Subregion
Submit   List    Runs   Forum   Statistics

Tianjin University Online Judge v1.3.0
Maintance:Fxz. Developer: SuperHacker, G.D.Retop, Fxz