#include <stdio.h>

float point[300][2] = { {0.0} };
int search(int num);

int main(void) {
	int i, num;

	while (1) {
		scanf("%d\n", &num);
		if (num == 0) {
			break;
		}

		for (i = 0; i < num; i++) {
			scanf("%f %f\n", &point[i][0], &point[i][1]);
		}

		printf("%d\n", search(num));

		for (i = 0; i < num; i++) {
			point[i][0] = 0.0;
			point[i][1] = 0.0;
		}
	}
	return 0;
}

int search(int num) {
	float x, y;
	int i, count, maxcount = 0;

	for (x = 1; x < 10; x += 0.05) {
		for (y = 1; y < 10; y += 0.05) {
			count = 0;
			for (i = 0; i < num; i++) {
				float X = x - point[i][0];
				float Y = y - point[i][1];
				if (1.0 >= (X*X + Y*Y)) {
					count++;
				}
			}
			if (count > maxcount) {
				maxcount = count;
			}
			if (maxcount == num) {
				return maxcount;
			}
		}
	}
	return maxcount;
}