import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Control.Monad
import Data.List
import Debug.Trace

solve :: [Int] -> (Int, Int)
solve arr = (minC, maxC)
    where
        (colored, freeChoice) = partition (< 3200) arr
        colorCount = length $ nub $ map (`div` 400) colored
        freeCount = length freeChoice
        minC = max colorCount 1
        maxC = min (colorCount + freeCount) 8

main :: IO ()
main = do
    _ <- BS.getLine
    arr <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    let (minC, maxC) = solve arr
    putStrLn $ (show minC) ++ " " ++ (show maxC)
