-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

import Data.List

main = putStrLn . unwords . map show . solve . map read . tail . words =<< getContents

solve s = [mincolors, maxcolors] where
    (lowers, highers) = partition (< 8) $ map (`div` 400) s
    mincolors = length $ nub lowers
    maxcolors = mincolors + length highers
