// Arup Guha
// 10/7/2018
// Solution to 2018 NAQ Problem: Fruit Slicer

import java.util.*;

public class fruitslicer_arup {
	
	public static int n;
	public static double[][] pts;
	
	public static void main(String[] args) {
		
		Scanner stdin = new Scanner(System.in);
		n = stdin.nextInt();
		pts = new double[n][2];
		
		// Read in points.
		for (int i=0; i<n; i++) {
			pts[i][0] = stdin.nextDouble();
			pts[i][1] = stdin.nextDouble();
		}
		
		// Ta da!
		System.out.println(solve());
	}
	
	public static int solve() {
		
		// Weird trick case where we can't draw tangent lines at all.
		if (alleq()) return n;

		// Takes care of whether 1 or 2 is minimum.
		int res = n == 1 ? 1 : 2;
		
		// Try all pairs of circles.
		for (int i=0; i<n; i++) {
			for (int j=i+1; j<n; j++) {
				
				// A tangent line to circles i, j.
				ArrayList<double[][]> lines = getTangents(i, j);
				for (double[][] line: lines)
					res = Math.max(res, count(line[0], line[1]));
			}
		}
		
		return res;
	}
	
	// Returns true iff all pts are equal.
	public static boolean alleq() {
		for (int i=1; i<n; i++) 
			if (Math.abs(pts[0][0]-pts[i][0]) > 1e-9 || Math.abs(pts[0][1]-pts[i][1]) > 1e-9)
				return false;
		return true;
	}
	
	// Returns one tangent line btw circles i and j.
	public static ArrayList<double[][]> getTangents(int i, int j) {
		
		// First get direction vector of same side tangent line.
		double[] dCenters = getVect(pts[i], pts[j]);
		double dmag = mag(dCenters);
		
		// Now, translate to a point on circle i by both perpendiculars above.
		double[][] ptsC1 = new double[2][2];
		ptsC1[0][0] = pts[i][0] + dCenters[1]/dmag;
		ptsC1[0][1] = pts[i][1] - dCenters[0]/dmag;
		ptsC1[1][0] = pts[i][0] - dCenters[1]/dmag;
		ptsC1[1][1] = pts[i][1] + dCenters[0]/dmag;
		
		// Do same for circle j, getting 4 pts of interest.
		double[][] ptsC2 = new double[2][2];
		ptsC2[0][0] = pts[j][0] + dCenters[1]/dmag;
		ptsC2[0][1] = pts[j][1] - dCenters[0]/dmag;
		ptsC2[1][0] = pts[j][0] - dCenters[1]/dmag;
		ptsC2[1][1] = pts[j][1] + dCenters[0]/dmag;
		
		ArrayList<double[][]> res = new ArrayList<double[][]>();
		
		double[][] tmp = new double[2][];
		tmp[0] = ptsC1[0];
		tmp[1] = getVect(ptsC1[0], ptsC2[0]);
		res.add(tmp);
		tmp = new double[2][];
		tmp[0] = ptsC1[1];
		tmp[1] = getVect(ptsC1[1], ptsC2[1]);
		res.add(tmp);

		// This is the line we care about.
		return res;
	}
	
	// Counts the number of circles that intersect the line with pt (x,y)
	// moving in direction (dx, dy)
	public static int count(double[] pt, double[] dir) {
		
		int cnt = 0;
		for (int i=0; i<n; i++) 
			if (ptLineDist(pts[i], pt, dir) < 1+1e-9)
				cnt++;
		return cnt;
	}
	
	// Usual point line distance formula.
	public static double ptLineDist(double[] pt, double[] linept, double[] linedir) {
		double[] vectToPt = getVect(linept, pt);
		double crossProdMag = Math.abs(linedir[0]*vectToPt[1] - vectToPt[0]*linedir[1]);
		return crossProdMag/mag(linedir);
	}
	
	// Gets the vector from s to e.
	public static double[] getVect(double[] s, double[] e) {
		return new double[] {e[0]-s[0], e[1]-s[1]};
	}
	
	// Returns the magnitude of this vector.
	public static double mag(double[] v) {
		return Math.sqrt(v[0]*v[0]+v[1]*v[1]);
	}

}
