Hide

Problem G
Maximum Number of Colinear Points

Input

Input contains several test cases. Each test case begins with an integer $n$ ($1 \leq n \leq 1000$). Then follow a list of n points, one per line, each of the form $x\ y$. Coordinates are integer with absolute value bounded by 10000. The given points are all distinct. The input is terminated by a case beginning with 0.

Output

For each test case, output the maximum number of simultaneously colinear points in the given set of points.

Sample Input 1 Sample Output 1
3
0 0
10 0
0 10
1
20 20
6
50 50
60 55
70 60
80 65
50 40
50 30
0
2
1
4

Please log in to submit a solution to this problem

Log in