Gandhi and Dundee#4166

Gandhi and Dundee

1 second
64 megabytes
Hard

Gandhi went to Dundee. Gandhi is a handful, don't mess with Gandhi. Gandhi will eat whatever he can reach on his way.

He can reach all points which are within his eating radius from a certain point on his way. He's taking the shortest route from the point to Dundee, which, on planet Earth, is a great circle arc passing through his start and end points. The arc is not larger than a half of the great circle.

The distance to the edible points is measured along the surface of the Earth. We must find the surface area of the territory where no decent person should go to avoid being eaten by Gandhi.

Input

The first line of the input file contains six real numbers x_0, y_0, x_1, y_1, , — the latitude and longitude of the beginning point of the interval (in degrees) and, correspondingly, of the ending point, as well as the radius of Earth and Gandhi's eating radius (-90 \leq x_0, x_1 \leq 90, -180 \leq y_0, y_1 \leq 180, 1 \leq R \leq 10000, 0 \leq eps \leq R).

Output

The output file must contain a single real number – the surface area of the dangerous territory with absolute or relative error within 10^{-8}.

Examples

Example 1

Loading
Loading