There are
Input Specification
- The first line contains one integer
representing the number of points in the plane. - The next
lines are the and coordinates of the points. The and coordinate values are separated by a space. It is guaranteed that and are integers and in the range of . - You can assume that the points are unique.
Output Specification
An integer represents the minimum area of a square that can cover at least two points in the plane.
Sample Input 1
Copy
3
0 0
2 1
-2 -4
Sample Output 1
Copy
4
Explanation for Sample Output 1
A possible square is with the lower left corner and upper right corner locating at
Sample Input 2
Copy
3
0 0
2 2
3 3
Sample Output 2
Copy
1
Explanation for Sample Output 2
A possible square is with the lower left corner and upper right corner locating at
Comments