// AOJ 1132: Circle and Points
// 2017.10.31 bal4u@cc

#include <stdio.h>
#include <math.h>

#define EPS 1e-5
double x[301], y[301];

int main()
{
	int n, i, j, k, f, ans;
	double dx, dy, d, dd, a, ax, ay, x0, y0;

	while (scanf("%d", &n) && n > 0) {
		for (i = 0; i < n; i++) scanf("%lf%lf", x+i, y+i);
		ans = 1;
		for (i = 0; i < n; i++) for (j = i+1; j < n; j++) {
            dx = x[i]-x[j], dy = y[i]-y[j];
            dd = dx*dx + dy*dy; d = sqrt(dd);
            if (d <= 2+EPS) {
	            a = sqrt(1.0 - dd/4);
		        ax= -dy/d*a, ay = dx/d*a;
				x0 = (x[i]+x[j])/2 + ax, y0 = (y[i]+y[j])/2 + ay;
				for (f = 0, k = 0; k < n; k++) {
					if ((x[k]-x0)*(x[k]-x0)+(y[k]-y0)*(y[k]-y0) < 1+EPS) f++;
				}
				if (f > ans) ans = f;
			}
        }
        printf("%d\n", ans);
    }
	return 0;
}