include Math

loop {
	n = gets.to_i
	break if n == 0
	points = (1..n).map { gets.split.map &:to_f }

	max = 1
	points.combination(2){|(x1, y1), (x2, y2)|
		l = hypot(x1 - x2, y1 - y2)
		next if l > 2
		k = sqrt(4 - l*l) / l
			
		u = (x1 + x2 + k * (y1 - y2)) / 2
		v = (y1 + y2 + k * (x2 - x1)) / 2
		c = points.count{|x, y| hypot(u-x, v-y) <= 1.00001}
		max = c if c > max

		u = (x1 + x2 - k * (y1 - y2)) / 2
		v = (y1 + y2 - k * (x2 - x1)) / 2
		c = points.count{|x, y| hypot(u-x, v-y) <= 1}
		max = c if c > max
	}
	p max
}