A 2D grid consists of a lot of special lights bulbs, which turns on upon the incidence of a laser light. Each bulb has a specific coordinate and initially all of them are turned off. Now, you are given a super power, where you can place a laser light in the grid for once. Laser light goes in a straight line. You want to put the laser light in such a way, that you can turn on maximum number of light bulbs. The laser light must pass through point. So, before placing the laser you want to write a program to find out the maximum number of lights that can be turned on.
First line will have the number of bulbs, (). Each of the next lines will contain two numbers () and (), which represents the coordinate of a bulb.
Print a number which is the maximum number of turned on bulbs.
Input | Output |
---|---|
5 1 1 2 2 3 3 5 3 -4 -3 | 3 |