Circle and Points

No attempts yetTime limit1sMemory limit128 MB

Problem

There are $N$ points on the $xy$-plane. Determine the maximum number of these points that can be covered by a single circle of radius $1$. A point is considered covered if it lies inside the circle or exactly on its boundary.

Input

The input consists of several test cases. The first line of each test case contains the number of points $N$. Each of the following $N$ lines contains the coordinates $X$ and $Y$ of one point, given to five decimal places.

The last line of the input contains $0$, which marks the end of the input.

  • $1 \le N \le 300$
  • $0 \le X, Y \le 10.0$
  • No two distinct points are closer than $0.0001$ to each other.
  • No two points have a distance $d$ with $1.999 \le d \le 2.0001$.
  • No three points lie near the boundary of a single radius-$1$ circle at the same time. That is, there is no radius-$1$ circle whose center is at distances $d_1, d_2, d_3$ from three points $P_1, P_2, P_3$ such that $0.9999 \le d_i \le 1.0001$ holds for all three simultaneously.

Thanks to these guarantees, no point ever sits ambiguously on a circle's boundary.

Output

For each test case, print on its own line the maximum number of points that can be covered by a single circle of radius $1$.