TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Given n points on the plane, determine the maxmimum number of points lying on a single line. That is, the line could be arbitrarily chosen, and you are to find the largest possible number of points a line could cross simultaneously.


You can assume there are no two points with same coordinates.

Input Format

There are multiple testcase, input is terminated by EOF.
Each testcase starts with an integer N (1<=N<=1000), and the following N lines each contain a pair of integer that represents the coordinate of a point. 0 <= |xi|, |yi| <= 1000000.

Output Format

For each testcase output an integer on a single line, indicating the maximumm number of points a single straight line could cross.

Sample Input 1

8
2 3
4 7
1 6
5 9
2 2
0 -3
6 11
-2 -5

Sample Output 1

5

Hints

Problem Source

Migrated from old NTUJ.

uva270

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 10000 65536 200