#include<math.h>
typedef struct{double x,y;}P;
int pgeta(P*p){return~scanf("%lf%lf",&p->x,&p->y);}
double pabs(P p){return hypot(p.x,p.y);}
double pabssq(P p){return p.x*p.x+p.y*p.y;}
P pmake(double x,double y){P p;p.x=x;p.y=y;return p;}
P padd(P a,P b){return pmake(a.x+b.x,a.y+b.y);}
P psub(P a,P b){return pmake(a.x-b.x,a.y-b.y);}
P pmul(P a,double b){return pmake(a.x*b,a.y*b);}
P pdiv(P a,double b){return pmake(a.x/b,a.y/b);}
P punit(P p){return pdiv(p,pabs(p));}//PÊxNg
P prot_l(P p){return pmake(-p.y,p.x);}//xNgÌ¶90xñ]
P pnormal_l(P p){return punit(prot_l(p));}//@üxNg(¶)
P pcenter(P a,P b){return pmake((a.x+b.x)/2,(a.y+b.y)/2);}//_
double distsq_p_p(P a,P b){return pabssq(psub(a,b));}//2_Ì£Ìñæ

main(){
	int N,i,j,k,c,cm;
	P q[300];
	for(;scanf("%d",&N)*N;){
		for(i=0;i<N;i++)
			pgeta(q+i);
		cm=1;//ß¢2_ª³­ÄàA1_ÍÆè ¦¸Íßé
		for(i=0;i<N;i++){
			for(j=0;j<i;j++){
				P a=q[i];
				P b=q[j];
				P ab=psub(a,b);
				double absq=pabssq(ab);
				if(absq<=4){
					P m=pcenter(a,b);
					P mpn=pnormal_l(ab);
					P mp=pmul(mpn,sqrt(1-absq/4));
					{
						P p=padd(m,mp);
						c=0;
						for(k=0;k<N;k++){
							if(k==i||k==j||distsq_p_p(q[k],p)<1)
								c++;
						}
						if(c>cm)
							cm=c;
					}
					{
						P p=psub(m,mp);
						c=0;
						for(k=0;k<N;k++){
							if(k==i||k==j||distsq_p_p(q[k],p)<1)
								c++;
						}
						if(c>cm)
							cm=c;
					}
				}
			}
		}
		printf("%d \n",cm);
	}
}