Time limit
2s
Memory limit
128 MB
There are N distinct points on a two-dimensional plane. Choose some of the points so that all of the following conditions hold.
Given the coordinates of all points, find the maximum number of points that can be chosen while satisfying the conditions.
The first line contains the number of points N (3 <= N <= 1,000).
Each of the next N lines contains two integers, the x-coordinate and y-coordinate of one point. The absolute value of every coordinate is at most 20,000. All given points are distinct.
Print the maximum number of points that can be chosen while satisfying the conditions. If no valid choice exists, print -1.