Galaxy collision

No attempts yetTime limit3sMemory limit256 MB

Problem

The Andromeda galaxy is expected to collide with the Milky Way in about 3.8 billion years. The distances between stars are enormous, so the collision will merge the two galaxies without any two stars hitting each other. Professor Andrew is building a computational model that predicts the outcome of the collision, and he needs your help.

You are given a set of points in the two dimensional plane. Each point is a star in one region of the already merged galaxies. Professor Andrew does not know which galaxy each star came from, but he knows that in this region the distance between two stars from the same galaxy is always greater than 5 light years.

Every star in the region came either from Andromeda or from the Milky Way, so the given set of points splits into two disjoint subsets, and inside each subset the minimum distance between two points is greater than 5 light years. The professor calls such a split a good separation. There may be many different good separations. Among all of them, compute the smallest number of points that a subset can contain.

The six points of the first example admit four good separations: {1, 2, 4, 5} and {3, 6}, {1, 2, 3, 4} and {5, 6}, {1, 4, 5} and {2, 3, 6}, {1, 3, 4} and {2, 5, 6}, where the numbers are the positions of the points in the input. The smallest subset in any of them holds two points, so at least two stars came from Andromeda.

Input

The first line contains an integer NN (1N5×1041 \le N \le 5 \times 10^4), the number of points in the set. Each of the next NN lines contains two integers XX and YY (1X,Y5×1051 \le X, Y \le 5 \times 10^5), the coordinates of one point in light years. No two points coincide, and the set admits at least one good separation.

Output

Print one line with the smallest number of points that a subset can have in a good separation.