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

main = do
  s' <- getContents
  let s = map (map (read :: String -> Micro)) $ map ((nspilit 7) . (delete ' ')))
$ init $ tail $ lines s'
  print $ alljudge s s 0