import Data.Fixed (Micro)
import Data.List (delete)

judge :: [Micro] -> [Micro] -> Int
judge [x1,y1] [x2,y2]
  | (x1 - x2)^2 + (y1 - y2)^2 <= 4 = 1
  | otherwise                       = 0

alljudge :: [[Micro]] -> [[Micro]] -> Int -> Int
alljudge (x:xs) ys n
  | xs == []         = n
  | mapmax x ys > n  = alljudge xs ys (mapmax x ys)
  | otherwise        = alljudge xs ys n
    where
      mapmax :: [Micro] -> [[Micro]] -> Int
      mapmax x ys = sum (map (judge x) ys)

nspilit n ns = [(take n ns), (drop (n + 1) ns)]

trns mcr = map (read :: String -> Micro) $ nspilit 7 $ delete ' ' mcr


test xs ys n = do
  if n == 0 then test2 (ys ++  [alljudge xs xs 0])
     else do
       s <- getLine
       test (xs ++  [trns s]) ys (n - 1)

test2 ys = do
  s <- readLn
  if s == 0 then putStr $ unlines $ map show ys
  else do
    test [] ys s

main = test2 []