#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <complex>
using namespace std;

//#define double long double
typedef complex<double> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
const int R = 100000;

int N;
P X[300];

int f(P x, int a, int b) {
  int ctr = 2;
  rep(i, N) {
    if (i == a || i == b) continue;
    P p = X[i];
    if (abs(x-p) <= 1.0) ctr++;
  }
  return ctr;
}

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  while (cin >> N && N != 0) {
    rep(i, N) {
      double x, y;
      cin >> x >> y;
      X[i] = P(x, y);
    }
    int ans = 1;
    rep(i, N) {
      rep(j, i) {
        P a = X[i], b = X[j];
        P base = (a+b)/(double)2.0;
        P v = b-a;
        double d = abs(v) / 2.0;
        if (d > 1) continue;
        P h1 = ((v*P(0, +1)) / abs(v)) * sqrt(1.0-d*d);
        P h2 = ((v*P(0, -1)) / abs(v)) * sqrt(1.0-d*d);
        ans = max(ans, f(base+h1, i, j));
        ans = max(ans, f(base+h2, i, j));
      }
    }
    cout << ans << "\n";
  }
  return 0;
}