import Data.List
import qualified Data.ByteString.Char8 as B

main = getLine >> breads >>= B.putStrLn . edit . solve . sort
    where
        edit (a, b) = B.unwords $ fmap (B.pack . show) [a, b]

solve :: [Int] -> (Int, Int)
solve xs
    | cst == 0 = (1, n)
    | otherwise = (cst, cst + n)
    where
        (cst, n) = count (0, 0) xs

        count (acc, prev) (y : ys)
            | y >= 3200 = (acc, length ys + 1)
            | y > prev = count (acc + 1, upper y) ys
            | otherwise = count (acc, prev) ys
        count (acc, _) _ = (acc, 0)

        upper x
            | x < 400 = 399
            | x < 800 = 799
            | x < 1200 = 1199
            | x < 1600 = 1599
            | x < 2000 = 1999
            | x < 2400 = 2399
            | x < 2800 = 2799
            | x < 3200 = 3199
            | otherwise = 4800

breads :: IO [Int]
breads = unfoldr uff <$> B.getLine
    where
        uff b = check <$> B.readInt b
        check (a, b)
            | B.null b = (a, b)
            | otherwise = (a, B.tail b)
