#include <bits/stdc++.h>

using namespace std;

#define X first
#define Y second

using R=long double;
using P=pair<R, R>;

const double EPS = 1e-10;

R dist2(P a, P b) {
	R dx = a.X - b.X;
	R dy = a.Y - b.Y;
	return dx*dx+dy*dy;
}

int main() {
	int n;
	while(cin >> n, n) {
		vector<P> p(n), pl;
		for(int i = 0; i < n; i++) cin >> p[i].X >> p[i].Y;
		for(int i = 0; i < p.size(); i++) {
			P p1 = p[i];
			for(int j = i+1; j < p.size(); j++) {
				P p2 = p[j];
				if(dist2(p1, p2)-EPS > 4.0) continue;

				R dxy2 = sqrt(dist2(p1, p2)/4.0);
				R l = sqrt(1-(dxy2*dxy2));
				R cx = (p1.X+p2.X)/2.0;
				R cy = (p1.Y+p2.Y)/2.0;
				R dx = (p2.X-p1.X);
				R dy = (p2.Y-p1.Y);

				R dlx = l/sqrt(dist2(p1, p2)) * dy;
				R dly = l/sqrt(dist2(p1, p2)) * -dx;

				pl.push_back(P(cx+dlx, cy+dly));
				pl.push_back(P(cx-dlx, cy-dly));
			}
		}

		int res = 1;
		for(P p1:pl) {
			int tmp = 2;
			for(P p2:p) {
				if(sqrt(dist2(p1, p2)) < 1.0-EPS) tmp++;
			}
			res = max(res, tmp);
		}

		cout << res << endl;
	}

	return 0;
}