import Control.Monad
import Control.Applicative
import Data.Array

eps :: Double
eps = 1.0e-8

type Point = (Double, Double)
add (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
sub (x1, y1) (x2, y2) = (x1 - x2, y1 - y2)
mul (x, y) s = (x * s, y * s)
nrm  (x, y) = (x / n, y / n) where n = sqrt $ (x * x + y * y)
dst  (x, y) = sqrt $ (x * x + y * y)
dst2 (x, y) = x * x + y * y
getX (x, _) = x
getY (_, y) = y

parsePoint :: String -> Point
parsePoint str =
    let [x, y] = map read $ words str
    in (x, y)

calcCenter :: Point -> Point -> (Point, Point)
calcCenter a b =
    let m = (a `add` b) `mul` 0.5
        d = sqrt (1.0 - ((dst $ a `sub` m) ** 2.0))
        e = a `sub` b
        n = nrm $ (negate $ getY e, getX e)
        c1 = m `add` (n `mul` d)
        c2 = m `sub` (n `mul` d)
    in (c1, c2)

solve' :: [Point] -> Int
solve' pts =
    let np    = length pts
        parr  = listArray (0, np-1) pts
        pairs = [ (parr ! i, parr ! j) | i <- [0..np-1], j <- [i+1..np-1] ]
    in if null pairs
        then 1
        else maximum $ map countUp pairs where
            countUp (p, q) =
                if (dst2 $ p `sub` q) >= 4.0 - eps
                    then 1
                    else
                        let (c1, c2) = calcCenter p q
                            m1 = length $ filter (\p -> (dst2 $ p `sub` c1) <= 1.0 + eps) pts
                            m2 = length $ filter (\p -> (dst2 $ p `sub` c2) <= 1.0 + eps) pts
                        in (max m1 m2)

solve :: [String] -> [Int]
solve []   = []
solve cont =
    let n           = read (head cont) :: Int
        (crds, rst) = splitAt n (tail cont)
        pts         = map parsePoint crds
    in if n == 0 then []
                 else (solve' pts) : solve rst

main :: IO ()
main = do
    contents <- getContents
    mapM_ print $ solve $ lines contents