import Data.List
main = do
  n <- read <$> getLine
  as <- map read . words <$> getLine
  let xs = filter (/=8) $ map (`div`400) as
      y = length $ group $ sort xs
  putStrLn $ unwords $ map show [y`max`1, y+n-length xs]