module Main where

import Control.Applicative
import Control.Monad
import Data.List
import Text.Printf (printf)

rate :: Int -> Int
rate n
    | n < 400   = 1
    | n < 800   = 2
    | n < 1200  = 3
    | n < 1600  = 4
    | n < 2000  = 5
    | n < 2400  = 6
    | n < 2800  = 7
    | n < 3200  = 8
    | otherwise = 9

main :: IO ()
main = do
    getLine
    as <- fmap read . words <$> getLine :: IO [Int]

    let (bs, cs) = partition ((== 9) . head) . group . sort $ fmap rate as
    let colors = length cs
    let js = if null bs then 0 else length (head bs)

    if colors == 0
        then printf "%d %d\n" (1 :: Int) (min (colors + js) 8)
        else printf "%d %d\n" colors     (min (colors + js) 8)