Time limit
1s
Memory limit
256 MB
Given n points on a two-dimensional plane, write a program that finds the squared distance between the closest pair of points.
The first line contains a natural number n (2 <= n <= 100,000). Each of the next n lines contains the x and y coordinates of one point. Every coordinate is an integer whose absolute value is at most 10,000. Multiple points may have exactly the same coordinates.
Print the squared distance between the closest pair of points.