import Data.List
 
main = do
  getLine
  xs <- map read . words <$> getLine
  putStr . show . f . map g xs
  putStr " "
  putStr . show . h . map g xs
 
g x
  | x < 400 = 1
  | x < 800 = 2
  | x < 1200 = 3
  | x < 1600 = 4
  | x < 2000 = 5
  | x < 2400 = 6
  | x < 2800 = 7
  | x < 3200 = 8
  | otherwise = 9
 
f = length . nub . filter (<9)
h xs = (f xs) + ((length . filter (==9)) xs)