### constant

DELTA = 1e-9

### main

loop do
  n = gets.to_i
  break if n == 0

  pts = n.times.map{gets.split.map(&:to_f)}
  #p pts

  max_c = 1

  for i in (0...n)
    xi, yi = pts[i]
    for j in ((i + 1)...n)
      xj, yj = pts[j]

      dx = xj - xi
      dy = yj - yi
      d2 = dx * dx + dy * dy

      if d2 < 4.0
        d = Math.sqrt(d2)
        t = Math.sqrt(1.0 - d2 / 4)

        xh = (xi + xj) / 2
        yh = (yi + yj) / 2
        dxh = -dy / d
        dyh =  dx / d

        x0 = xh + t * dxh
        y0 = yh + t * dyh

        x1 = xh - t * dxh
        y1 = yh - t * dyh

        #p [xi, yi, xj, yj, x0, y0, x1, y1]

        c0 = c1 = 0
        pts.each do |x, y|
          c0 += 1 if (x - x0) ** 2 + (y - y0) ** 2 < 1.0 + DELTA
          c1 += 1 if (x - x1) ** 2 + (y - y1) ** 2 < 1.0 + DELTA
        end
        max_c = c0 if max_c < c0
        max_c = c1 if max_c < c1
      end
    end
  end

  puts max_c
end