Riemannian Geometry-2
On the Earth's surface, a sequence of points is connected by smaller arcs of circles, each centered at the Earth's center, with the final point linking back to the first. This contour is known to have no self-intersections.
Your task is to develop a program that calculates the areas enclosed by this contour.
Input
The input consists of sextuples of integers, representing the coordinates of the points in the order they are traversed along the contour: degrees, minutes, and seconds of latitude, followed by degrees, minutes, and seconds of longitude. If a point is in the southern (western) hemisphere, the corresponding latitude (longitude) coordinates are given with a negative sign.
Output
The output should be a single record showing the ratio of the areas (smaller to larger) into which the contour divides the Earth's surface, with a precision of 9 decimal places.