# 50147. Circles

## Task Description

We have points on a 2-D plane and all their coordinates are integers. Now we need to find the circle centered at the origin (0, 0) that goes through the maximum number of the given points. Note that there could be multiple points at the same location. If there are multiple circles that have the maximum number of points, report the one with the largest radius. Note that you do not need to compute the square root square to calculate the distance to the origin. You can just compare the square of the radius, which gives the same result as comparing the radius.

## Input Format

The first line includes a positive integer $N$ as the number of points on 2-D plain. Then each of the following $N$ lines has two integers $x$ and $y$ as the x and y coordinate of a point.

• $N \leq 1000100$

## Output Format

Output the square of radius of the circle that has the maximum number of points.

## Subtasks

• 10 points: Every circle has exactly one point.
• 40 points: The circle having the most number of points is unique.
• 50 points: None of the previous simplification is true.

## Notes

The number of points in all subtasks is so large that you have to use qsort(). Note that you only need to sort the points according to the squares of the distance to the origin.

## Sample Input 1

51 32 11 42 21 1


## Sample Output 1

17


## Sample Input 2

53 12 21 31 31 1


## Sample Output 2

10


## Sample Input 3

55 03 40 -17-15 81 1


## Sample Output 3

289


## Testdata Set

Download Testdata