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 n, followed by n pairs of coordinates in clockwise or
anticlockwise order. Assume 3 ≤ n ≤ 1000, and that the coordinates are
real numbers between −10⁴ and 10⁴ 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
