Punching Power

Choose the largest subset of given grid points so every pair is more than 1.3 meters apart.

Medium6GraphGreedyGeometryBrute forceNo attempts yetTime limit2sMemory limit512 MB

Problem

The park management decided to install boxing machines at several places in the park. Machines have been in short supply, so this time they want to put up as many as they can. The park will still not fill up with machines, because the legal limits on where a machine may stand are strict.

The management marked every possible machine position on the park plan and wrote down its coordinates. The manufacturer's safety rule applies as well. The distance between any two boxing machines is at least 1.31.3 meters.

Find the largest number of boxing machines that can be installed without breaking that rule.

Input

The input holds several test cases. The first line of each test case has one integer NN, the number of possible machine positions in the park (1N20001 \le N \le 2000). Each of the next NN lines describes one position with two integer coordinates in meters. Every coordinate is at least 00 and at most 10910^9. The same coordinate pair never appears twice inside one test case.

The positions of one test case form a single connected group. Starting from any position you can reach every other position by steps that change exactly one coordinate by 11 and always land on a position where a machine may stand.

There are at most 100100 test cases, and the sum of NN over all test cases is at most 2000020000. The input ends at end of file.

Output

For each test case, print one line with the largest number of boxing machines that can be installed.