New Year's Snowfall
The king of a small but proud African nation has decided that there must be snow in his country for the New Year. To make this happen, he ordered the purchase of N special weather control devices. Once these devices were bought, installed, and activated, it indeed began to snow.
The king was delighted to see his plan come to fruition. However, he noticed that the snow falls with varying intensity across different parts of the country. Naturally, the king wants to celebrate the New Year in the location where the snow intensity is the greatest. Your task is to help him find this location.
The country's map is represented as a plane with a Cartesian coordinate system. Each device is installed at a point with integer coordinates and increases the snow intensity by exactly 1 at points with integer coordinates that lie on the boundaries of squares with the following characteristics:
The side lengths of the squares are of the form 4k+2, where k is a non-negative integer.
The sides of the squares are parallel to the coordinate axes.
The center of the squares coincides with the point where the device is installed.
The device does not affect the snow intensity at any other points on the plane.
The following illustration shows how the device operates:
In the illustration, the point at the center, marked in yellow, represents the device. The points where the snow intensity is increased by 1 due to the device's operation are marked in red.
Input
The first line contains the number N (1 ≤ N ≤ 1000).
The next N lines provide the coordinates of the points where the weather control devices are installed. Each line describes the coordinates of one device in the format "x y", where x is the x-coordinate and y is the y-coordinate (-1000000 ≤ x, y ≤ 1000000). No two devices are installed at the same point.
Output
Output a single integer, representing the maximum intensity of snow falling at any point on the plane.