Geometry
Geometry-10
Geometry-11
Geometry-12
~/algor $ cat problems/eng-katta-uchburchak
Largest triangle
Medium
1000 ms
128 MB
51%
$n$ points are given on the plane. Choose three of them to form a triangle of the largest area. To keep the answer an integer, print twice the largest area ($0$ if all the points lie on one line).
Input
The first line contains a positive integer $n$. Each of the next $n$ lines contains two integers: $x_{i}$ and $y_{i}$.
Output
One integer — twice the largest area.
Note
$3 \le n \le 100$
$-10^{6} \le x_{i}, y_{i} \le 10^{6}$
Examples
Input #1
5 0 0 4 0 1 1 2 3 0 2
Output #1
12
Input #2
3 0 0 1 1 2 2
Output #2
0