eolymp
bolt
Try our new interface for solving problems
Problems

Cut the watermelon

Cut the watermelon

Time limit 1 second
Memory limit 256 MiB

Vasya and Peter decided to share a watermelon in two parts (we assume perfect melon ball with unit radius). To do this, they make cuts. An incision is a pie in the plane of which the incision. Arc of the sector defined by two points not lying on one diameter of the ball. Cuts form a continuous closed polyline on the surface of the ball and divide the surface of the watermelon in two, and for any length of it is true that the entire polygon is on one side of the plane passing through this segment. We believe that the center of the sphere is at the origin. No two consecutive level broken line does not belong to the same line on the field.

Input data

The first line contains the number n (3n10) — the number of nodes scrap. The following n lines describe the point raised by triples of integers x_i, y_i, z_i, i = [1..n] (-50x_i, y_i, z_i50), points are given in random order. Point on the sphere is obtained as the intersection of the sphere with the ray from O to the point (x_i, y_i, z_i).

Output data

Bring out the amount of the lesser of two pieces with an accuracy of less than 7 digits after the decimal point.

Examples

Input example #1
3
1 0 0
0 1 0
0 0 1
Output example #1
0.5235988
Author Stanislav Pak
Source Winter School, Kharkov, 2011, Day 1