No tag edit access

D. Area of Two Circles' Intersection

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given two circles. Find the area of their intersection.

Input

The first line contains three integers *x*_{1}, *y*_{1}, *r*_{1} ( - 10^{9} ≤ *x*_{1}, *y*_{1} ≤ 10^{9}, 1 ≤ *r*_{1} ≤ 10^{9}) — the position of the center and the radius of the first circle.

The second line contains three integers *x*_{2}, *y*_{2}, *r*_{2} ( - 10^{9} ≤ *x*_{2}, *y*_{2} ≤ 10^{9}, 1 ≤ *r*_{2} ≤ 10^{9}) — the position of the center and the radius of the second circle.

Output

Print the area of the intersection of the circles. The answer will be considered correct if the absolute or relative error doesn't exceed 10^{ - 6}.

Examples

Input

0 0 4

6 0 4

Output

7.25298806364175601379

Input

0 0 5

11 0 5

Output

0.00000000000000000000

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/21/2017 18:42:38 (c4).

Desktop version, switch to mobile version.

User lists

Name |
---|