import Control.Monad
import Data.List

f rate (flags, free)
  | rate < 3200 = let idx = div rate 400 in (take idx flags ++ [True] ++ drop (idx+1) flags, free)
  | otherwise = (flags, free+1)

calc rs = show minc ++ " " ++ show maxc
  where
    (flags, free) = foldr f (replicate 8 False, 0) rs
    colors = length $ filter id flags
    minc = max colors 1
    maxc = colors + free


main = getLine >> getLine >>= putStrLn . calc . map read . words