import Data.List (sort)

main :: IO ()
main = do
    getLine
    a <- map read . words <$> getLine
    let ans = solve a
    putStr $ show (fst ans) ++ " " ++ show (snd ans)

solve :: [Int] -> (Int, Int)
solve a = (coll, max 1 (coll + cntp)) where
    hai  = filter (\x ->    1 <= x && x <=  399) a
    cha  = filter (\x ->  400 <= x && x <=  799) a
    mid  = filter (\x ->  800 <= x && x <= 1199) a
    miz  = filter (\x -> 1200 <= x && x <= 1599) a
    ao   = filter (\x -> 1600 <= x && x <= 1999) a
    ki   = filter (\x -> 2000 <= x && x <= 2399) a
    dai  = filter (\x -> 2400 <= x && x <= 2799) a
    aka  = filter (\x -> 2800 <= x && x <= 3199) a
    col  = [hai, cha, mid, miz, ao, ki, dai, aka]
    coll = length $ filter (\x -> not $ null x) col
    pro  = filter (\x -> 3200 <= x) a
    cntp = length pro