eolymp
bolt
Try our new interface for solving problems
Problems

Points

Points

On a plane are set \textbf{N} points. Separately on a plane two base points are set. Write a task program \textbf{POINTS}, which can find the maximal quantity of points which will get in a bar created the pair of parallel lines arbitrarily of conducted through base points. It is not needs to include base points to the sum of points. If a point lies on a line you must account it in a sum. \InputFile The first line contains one integer \textbf{N} (\textbf{0} ≤ \textbf{N} ≤ \textbf{10000}) - the qauntity of points. The second line contains the coordinates of two base points in the format \textbf{x_1}, \textbf{y_1} \textbf{x_2} \textbf{y_2}. Each of next \textbf{N} lines contains the co-ordinates of the point of plane in the format \textbf{x}, \textbf{y}. Coordinates of points are integers, which does not exceed \textbf{10000} by the module. Base points differ at least one coordinate. \OutputFile Print one integer - the maximal quantity of points, which will be in a bar, which will be formed the optimum conducted parallel lines through base points.
Time limit 1 second
Memory limit 64 MiB
Input example #1
4
0 0 50 0
0 -50
-1 0
50 0
100 50
Output example #1
3
Author Bogdan Rublev, Taras Galkovskiy
Source 2008 XXI All-Ukrainian Informatics Olympiad, Lvov, April 5 - 11, Round 2