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

int main(void) {
	int i, num, count, maxcount;
	float x, y;
	float point[300][2] = {0};

	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]);
		}

		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++) {
					if (1.0 >= (x - point[i][0]) * (x - point[i][0]) + (y - point[i][1]) * (y - point[i][1])) {
						count++;
					}
				}
				if (count > maxcount) {
					maxcount = count;
				}
			}
		}
		printf("%d\n", maxcount);

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