No tag edit access

The problem statement has recently been changed. View the changes.

×
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-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/18/2021 10:16:25 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|