import Data.List
import Data.Bool

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

solve :: [Int] -> [Int]
solve (n:xs) = bool [cs+1, cs+1] [min 1 cs, cs+ts] ((head $ head xs') == 0)
    where
        ts = length $ head xs'
        cs = length xs' - 1
        xs' = group . sort $ map colorize xs

colorize x
    | x <= 399 = 1
    | x <= 799 = 2
    | x <= 1199 = 3
    | x <= 1599 = 4
    | x <= 1999 = 5
    | x <= 2399 = 6
    | x <= 2799 = 7
    | x <= 3199 = 8
    | otherwise = 0
