Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

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: Mar/25/2017 00:53:58 (p1).

Desktop version, switch to mobile version.
User lists

Name |
---|