Never trust Ivan

You are given a convex polygon. What is the probability that choosing any three vertices, plus any point inside the polygon, the four points do not form a convex quadrilateral?

Input

Input consists of several cases. Every case begins with the number of points nn, followed by nn pairs of coordinates in clockwise or anticlockwise order. Assume 3n10003 \le n \le 1000, and that the coordinates are real numbers between 104-10^4 and 10410^4 with at most two digits after the decimal point.

Output

For every case, print the asked probability with four digits after the decimal point. The input cases have no precission issues.

Problem information

Author: Ivan Geffner

Generation: 2026-01-25T11:24:58.981Z

© Jutge.org, 2006–2026.
https://jutge.org