import qualified Data.ByteString.Char8 as C
import Data.List
import qualified Data.IntSet as IS

main :: IO ()
main = do
    n <- readLn
    as <- map (`div` 400) <$> unfoldr (C.readInt . C.dropWhile (==' ')) <$> C.getLine
    let normal = filter (<8) as
    let free = n - (length normal)
    let rest = IS.size $ IS.fromList normal
    putStrLn $
        show (max 1 rest)
        ++ " "
        ++ (show $ min 8 (rest+free) )

