z-Garden
It’s that time of the day when Mr. Little goes in the sun to water his beautiful garden. The garden has all the beautiful flowers one can imagine, from lilies to beautiful roses. The flowers are arranged in the rectangular co-ordinate axis. Each flower is associated with a UNIQUE ordered pair of co-ordinates.
Unfortunately, Mr. Little Z has just enough water for a single linear squirt. So he decides to squirt in a direction that encounters the maximum number of flowers. Help him to find this maximum number.
InputThe first line of the standard input contains the number N where N is the number of flowers. The next N lines contain the space separated X and Y co-ordinates of the flowers. X and Y are known to be in the range of signed int and 1 < N < 700
OutputTo the standard output, write one number that is the maximum number of flowers covered in one squirt. The range of the linear squirt is sufficient to cover the very last flower in the line.
Sample Input:
5
1 1
2 2
3 3
9 10
10 11Sample Output:
3Explanation : (1,1) , (2,2) and (3,3) all lie on the same line y=x.
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.