eolymp
bolt
Try our new interface for solving problems
Problems

Random

Random

You're playing a new game at the shooting range. First, a target is placed on a square board. The target itself is a convex polygon strictly inside the board.

Then, you're allowed to shoot twice. In case at least one of your shots gets inside the target, you win. Moreover, if the segment connecting the points of your shots intersects the target, you still win. If none of the above holds, you lose.

Assuming your aiming is very bad (i.e., the points of your shots are independently uniformly distributed all over the board), compute the probability of you winning.

Input

The first line contains an integer n (3n8) - the number of vertices of the target. The next n lines contain two integers each, xi and yi (1xi, yi99), describing the coordinates of the vertices of the target (a convex polygon) in the counter-clockwise direction. No three vertices of the target lie on the same line.

The coordinate system is chosen so that the corners of the board have coordinates (0, 0), (0, 100), (100, 0) and (100, 100).

Output

Output the required probability. Your solution will be accepted if it is within 10-7 of the correct one.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4
25 25
75 25
75 75
25 75
Output example #1
0.7328341829895609
Input example #2
3
75 25
75 75
50 50
Output example #2
0.38204209149478047
Source 2007 Петрозаводск, Petr Mitrichev Contest 2, Январь 30, Задача H