Geometry
Geometry-18
Geometry-19
Geometry-20
~/algor $ cat problems/nuqtalar-diametri
Diameter of a point set
Hard
2000 ms
128 MB
67%
$n$ points are given on the plane (some may coincide). Find the largest distance between them. To keep the answer an integer, print the square of this distance.
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 — the square of the largest distance.
Note
$1 \le n \le 10^{5}$
$-10^{9} \le x_{i}, y_{i} \le 10^{9}$
Examples
Input #1
5 0 0 3 1 1 4 -2 2 1 1
Output #1
26
Input #2
1 7 7
Output #2
0