main :: IO ()
main = do
  ls <- getContents
  let ls' = map (map (read :: String -> Float)) (map words (lines ls))
      ans = map format (foldl check [(0,0),(0,0),(0,0),(0,0)] ls')
  mapM_ putStrLn ans

checkl :: [(Int,Int)] -> [Float] -> [(Int,Int)]
checkl [pa,pb,pc,pd] [l,r]
  | l >= 1.1 = [(((fst pa)+1),(snd pa)),pb,pc,pd]
  | l >= 0.6 = [pa,(((fst pb)+1),(snd pb)),pc,pd]
  | l >= 0.2 = [pa,pb,(((fst pc)+1),(snd pc)),pd]
  | otherwise = [pa,pb,pc,(((fst pd)+1),(snd pd))]

checkr :: [(Int,Int)] -> [Float] -> [(Int,Int)]
checkr [pa,pb,pc,pd] [l,r]
  | r >= 1.1 = [((fst pa),((snd pa)+1)),pb,pc,pd]
  | r >= 0.6 = [pa,((fst pb),((snd pb)+1)),pc,pd]
  | r >= 0.2 = [pa,pb,((fst pc),((snd pc)+1)),pd]
  | otherwise = [pa,pb,pc,((fst pd),((snd pd)+1))]

check :: [(Int,Int)] -> [Float] -> [(Int,Int)]
check lt lf = checkr (checkl lt lf) lf

format :: (Int,Int) -> String
format (a,b) = (show a) ++ " " ++ (show b)