Mine Clearing

No attempts yetTime limit10sMemory limit512 MB

Problem

A new mine clearing machine has arrived at the site. One activation removes every mine inside a 10m × 10m square at once, and mines lying on the border of that square are removed as well. Two sides of the square are parallel to the x-axis and the other two are parallel to the y-axis, and the machine can be placed anywhere on the site.

The positions of all mines buried in the 10,000m × 10,000m site are known. Write a program that finds the largest number of mines one activation can remove.

Input

The first line contains the number of test cases TT (1T101 \le T \le 10).

The first line of each test case contains the number of mines NN (4N1000004 \le N \le 100000), and the next NN lines give the coordinates of the mines, one mine per line. Each of those lines holds two integers between 00 and 1000010000 separated by a single space, the x-coordinate first and the y-coordinate second. No two mines sit at the same coordinates, and a mine is small enough that its size can be ignored.

Output

For each test case, print on its own line the largest number of mines one activation can remove.