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

double dis( double x1,double y1,double x2,double y2 ){
  x1-=x2;  y1-=y2;
  x1*=x1;  y1*=y1;
  return x1+y1 ;
}
int main(void){
  int n;
  double x[300],y[300];
  double x0,y0,x1,y1,x2,y2, xc1,yc1,xc2,yc2;
  double a,b,c,d,e,f;
  int i,j,k,l;
  int max;

  while( 1 ){
    scanf("%d ",&n);
    if( !n )
      break;
    for(i =0;i<n;i++)
      scanf("%lf %lf ",&x[i],&y[i] );

    max = 0;
    for( i=0;i<n-1;i++){
      for( j=i+1;j<n;j++){
	x1=x[i]; y1=y[i];
	x2=x[j]; y2=y[j];
	if( dis(x1,y1,x2,y2) > 4.0 )
	  continue;

	x0 = ( x1+x2 )/2; y0 = ( y1+y2 )/2;
	// determin (xc1,yc1) , (xc2,yc2)
	e = x0*(x2-x1)/(y2-y1);
	f =    (x2-x1)/(y2-y1);

	a = x0-x1; b=y0-y1;
	d = 1.0-a*a-b*b;

	a = f+1.0;
	b = -2.0*(x0+e*f);
	c = x0*x0+y0*y0-d;

	xc1 = ( -b+sqrt( b*b-4.0*a*c ) )/(2.0*a);
	xc2 = ( -b-sqrt( b*b-4.0*a*c ) )/(2.0*a);
	yc1 = e-f*xc1 +y0;
	yc2 = e-f*xc2 +y0;

	/*/	
	printf("(%f %f) (%f %f) (%f %f)\n",xc1,yc1,x1,y1,x2,y2);
	printf("1-1 %f\n",dis(xc1,yc1,x1,y1) );
	printf("1-2 %f\n",dis(xc1,yc1,x2,y2) );
	printf("1-0 %f\n",dis(xc1,yc1,x0,y0) );

	printf("2-1 %f\n",dis(xc2,yc2,x1,y1) );
	printf("2-2 %f\n",dis(xc2,yc2,x2,y2) );
	printf("2-0 %f\n",dis(xc2,yc2,x0,y0) );
	//	*/


	k=2;
	for( l=0;l<n;l++ ){
	  if( l==i || l==j )
	    continue;
	  if( dis(x[l],y[l],xc1,yc1)<=1.0 )
	    k++;
	}
	if( max<k )
	  max=k;
	k=2;
	for( l=0;l<n;l++ ){
	  if( l==i || l==j )
	    continue;
	  if( dis(x[l],y[l],xc2,yc2)<=1.0 )
	    k++;
	}
	if( max<k )
	  max=k;
      }
    }
    printf("%d\n",max);
  }
  return 0;
}