#include <iostream>
#include <vector>
#include "math.h"

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
using namespace std;

typedef struct point{
    double x;
    double y;
} point;

typedef vector<point> Points;

inline bool Check(const point A, const point B); //シールが重なっているか
inline void Cross1(const point A, const point B, vector<point> &edg_p); //重なり領域の端点
void Cross2(const point A, const point B, vector<point> &edg_p); //3つめ以降の特殊端点
inline bool InCircle(const point a, const point A); //端点が円Aの中に入るか
inline double SquareSum(const point A, const point B);

int main(){
    int N;
    int counter=0, result=0;
    cin >> N;
    point circle[N];
    for(int i=0; i<N; ++i){
	cin >> circle[i].x;
	cin >> circle[i].y;
    }
    
    Points edg_p,cnt_c; //edge_point,count_circle
    double distance,MAXdst,MINdst;
    for(int i=0; i<N; ++i){ // 起点となるシール
	for(int j=i+1; j<N; ++j){ // 新しいシール
	    if(edg_p.empty() && Check(circle[i],circle[j])){ // 最初の2枚  
		cnt_c.push_back(circle[i]);
		cnt_c.push_back(circle[j]);
		counter=2;
		Cross1(circle[i],circle[j],edg_p);
	    }
	    else{ // 三枚目以降
		MAXdst = 0; MINdst = 10;
		for(Points::iterator it=edg_p.begin(); it==edg_p.end(); ++it){
		    distance = sqrt(SquareSum(*it,circle[j]));
		    MAXdst = MAX(distance,MAXdst);
		    MINdst = MIN(distance,MINdst);
		}
		if(MAXdst < 1) ++counter; // 新しいシールが完全に覆う
		else if(MINdst > 1){ // 新しいシールと一部が重なる
		    cnt_c.push_back(circle[j]);
		    int flag=0;
		    for(Points::iterator it=cnt_c.begin(); it==cnt_c.end(); ++it){
			if(Check(circle[j],*it)){
			    Cross2(circle[i],circle[j],edg_p);
			    flag=1;
			}
		    }
		    if(flag==1) ++counter;
		    for(Points::iterator it=edg_p.begin(); it==edg_p.end(); ++it){
			distance = sqrt(SquareSum(*it,circle[j]));
			if(distance > 1) edg_p.erase(it);
		    }
		}
	    } //
	} // 新しいシールcircle[j]終了
	result = MAX(result,counter);
	edg_p.clear();
	cnt_c.clear();
	counter=0;
    }
    cout << result << endl;
}

inline bool Check(const point A, const point B){
    double temp = SquareSum(A,B);
    if(temp < 4) return true;
    else return false;
}

inline void Cross1(const point A, const point B, vector<point> &edg_p){
    double temp = SquareSum(A,B);
    point temp2;
    double dx=A.x-B.x;
    double dy=A.y-B.y;
    temp2.x=(temp*dx + dy*sqrt((2-temp)*temp)) / (2*temp);
    temp2.y=(temp*dy - dx*sqrt((2-temp)*temp)) / (2*temp);
    edg_p.push_back(temp2);
    temp2.x=(temp*dx - dy*sqrt((2-temp)*temp)) / (2*temp);
    temp2.y=(temp*dy + dx*sqrt((2-temp)*temp)) / (2*temp);
    edg_p.push_back(temp2);
}

void Cross2(const point A, const point B, vector<point> &edg_p){
    double temp = SquareSum(A,B);
    point temp2,temp3;
    double dx=A.x-B.x;
    double dy=A.y-B.y;
    temp2.x=(temp*dx + dy*sqrt((2-temp)*temp)) / (2*temp);
    temp2.y=(temp*dy - dx*sqrt((2-temp)*temp)) / (2*temp);
    temp3.x=(temp*dx - dy*sqrt((2-temp)*temp)) / (2*temp);
    temp3.y=(temp*dy + dx*sqrt((2-temp)*temp)) / (2*temp);
    for(Points::iterator it1=edg_p.begin(); it1==edg_p.end(); ++it1){
	Points::iterator it2 = it1 + 1;
	if(it2==edg_p.end()){
	    edg_p.push_back(temp3);
	    break;
	}
    
	if( ((*it1).x < temp2.x)&&(temp2.x < (*it2).x)){
	    if( ((*it1).y < temp2.y)&&(temp2.y < (*it2).y) ){
		edg_p.push_back(temp2);
		break;
	    }
	    else if( ((*it2).y < temp2.y)&&(temp2.y < (*it1).y) ){
		edg_p.push_back(temp2);
		break;
	    }
	}
	else if( ((*it2).x < temp2.x)&&(temp2.x < (*it1).x) ){
	    if( ((*it1).y < temp2.y)&&(temp2.y < (*it2).y) ){
		edg_p.push_back(temp2);
		break;
	    }
	    else if( ((*it2).y < temp2.y)&&(temp2.y < (*it1).y) ){
		edg_p.push_back(temp2);
		break;
	    }
	}
    } // for_each　終了
}
							

inline bool InCircle(const point a, const point A){
    double temp = SquareSum(a,A);
    if(temp < 1) return true;
    else return false;
}

inline double SquareSum(const point A, const point B){
    double temp = (A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y);
    return temp;
}


    
/*
2つの円の方程式を
(x-x0)^2+(y-y0)^2=r0^2
(x-x1)^2+(y-y1)^2=r1^2
として、計算をすると
a=((x1-x0)^2+(y1-y0)^2+r0^2-r1^2)/2
x=x1-x0
y=y1-y0
とおいた時に
x = {ax+-y√((x^2+y^2)r1^2-a^2)}/x^2+y^2
x = {ay-+x√((x^2+y^2)r1^2-a^2)}/x^2+y^2
*/