import Data.List
import Control.Applicative

reshape :: [[Double]] -> [(Double, Double)]
reshape = map (\x -> (head x, last x))


solver :: [[Double]] -> [String]
solver [] = []
solver xs =
  let eyes   = reshape xs
      lefts  = map fst eyes
      rights = map snd eyes
      listAl = filter (>= 1.1) lefts
      listAr = filter (>= 1.1) rights
      listBl = filter (>= 0.6) (lefts \\ listAl)
      listBr = filter (>= 0.6) (rights \\ listAr)
      listCl = filter (>= 0.2) ((lefts \\ listAl) \\ listBl)
      listCr = filter (>= 0.2) ((rights \\ listAr) \\ listBr)
      listDl = lefts \\ union (listAl `union` listBl) listCl
      listDr = rights \\ union (listAr `union` listBr) listCr
      numA   = show (length listAl) ++ " " ++ show (length listAr)
      numB   = show (length listBl) ++ " " ++ show (length listBr)
      numC   = show (length listCl) ++ " " ++ show (length listCr)
      numD   = show (length listDl) ++ " " ++ show (length listDr)
  in
      [numA, numB, numC, numD]


main :: IO()
main = do
  contents <- map (map (read :: String -> Double) . words) . lines <$> getContents
  mapM_ putStrLn $ solver contents