#include <bits/stdc++.h>
using namespace std;
typedef struct Crl {
  double x, y;
};
int main() {
  int n;
  Crl *cr;
  while (true) {
    cin >> n;
    double x, y;
    int max = 0;
    if (n == 0) break;
    cr = new Crl[n];
    for (int i = 0; i < n; ++i) {
      cin >> x >> y;
      cr[i].x = x;
      cr[i].y = y;
    }
    for (int i = 0; i < n; ++i) {
      int count = 0;
      for (int j = 0; j < n; ++j) {
        if ((cr[i].x - cr[j].x) * (cr[i].x - cr[j].x) +
                (cr[i].y - cr[j].y) * (cr[i].y - cr[j].y) <=
            4) {
          ++count;
        }
      }
      if (count > max) max = count;
    }
    cout << max;
    delete[] cr;
  }
  return 0;
}
