A surveillance drone is analyzing a field with $$$n$$$ distinct beacon towers located at various coordinates on a 2D map. The drone may select any three distinct towers to form a triangular frame.
A triangle formed by three towers $$$A$$$, $$$B$$$, and $$$C$$$ is called a valid frame if it satisfies the following geometric condition:
When you extend each of the three sides of triangle $$$ABC$$$ infinitely in both directions (turning them into full lines):
The other two lines also have two towers lying on them, but in those cases, the remaining towers are not all on the same side — that is, some towers lie on one side and some on the other.
For every tower $$$P$$$, define its stability score as the smallest area of any valid frame (triangle) that includes $$$P$$$ as one of its vertices.
Your task is to determine the largest stability score among all towers that can form valid frames.
The first line contains one integer $$$n$$$ ($$$4 \le n \le 5000$$$) — the number of towers. Each of the next $$$n$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$-10^6 \le x, y \le 10^6$$$) — the coordinates of each tower.
All coordinates are unique, and no three points are colinear.
Print the largest stability score in one line. If no valid frame is possible, print 0.
Your answer will be considered correct if the absolute error is less than $$$10^{-4}$$$.
8 -4 3 -6 11 4 -12 -10 -18 20 20 19 -8 -10 13 14 11
93.0000000000
4 -5 4 6 2 3 -5 -12 1
0.0000000000