#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238462643383279;
bool inC(complex<double> p, complex<double> c, double r) {
  return abs(p - c) < r + 1e-9;
}
complex<double> getE(complex<double> p) { return p / abs(p); }
double sq(double x) { return x * x; }
int main() {
  int n, i, j, k, ans, cnt;
  double x, y;
  while (scanf("%d", &n)) {
    if (n == 0) break;
    ans = 1;
    vector<complex<double> > ps(n);
    for (i = 0; i < n; i++) {
      scanf("%lf%lf", &x, &y);
      ps[i] = complex<double>(x, y);
    }
    for (i = 0; i < n; i++)
      for (j = i + 1; j < n; j++)
        if (abs(ps[i] - ps[j]) < 2) {
          double d = sqrt(1 - sq(abs(ps[j] - ps[i]) * 0.5));
          complex<double> c1 = 0.5 * (ps[i] + ps[j]) +
                               getE(getE(ps[j] - ps[i])) * polar(d, PI / 2);
          complex<double> c2 = 0.5 * (ps[i] + ps[j]) +
                               getE(getE(ps[j] - ps[i])) * polar(d, -PI / 2);
          cnt = 0;
          for (k = 0; k < n; k++)
            if (inC(ps[k], c1, 1.0)) cnt++;
          if (cnt > ans) ans = cnt;
          cnt = 0;
          for (k = 0; k < n; k++)
            if (inC(ps[k], c2, 1.0)) cnt++;
          if (cnt > ans) ans = cnt;
        }
    printf("%d\n", ans);
  }
  return 0;
}
