Tori#1998

Tori

1 second
64 megabytes
Easy

A torus is formed by rotating a circle around an axis that lies in the plane of the circle but does not intersect it. Alternatively, a torus can be formed by rotating a sphere of diameter , whose center moves along a guiding circle , around an axis that does not intersect the sphere.

Two tori are positioned in space so that their guiding circles lie in the same plane. Determine the area of intersection of the projections of these tori onto that plane.

Input

The input consists of two lines, each describing a torus. Each line contains real numbers separated by spaces: , , — the coordinates of the center of the guiding circle (with absolute values not exceeding ), followed by (0 < R \leq 100) — the radius of the guiding circle, and (0 < d < 2R) — the diameter of the sphere.

Output

Output a single number — the area of the intersection of the projections of the tori, rounded to three decimal places.

Examples

Example 1

Loading
Loading