import Control.Applicative
import Data.List
import qualified Data.Set as Set

main = do
    n <- readLn
    as <- map read . words <$> getLine
    putStrLn $ pp (solve n as)

pp (x,y) = (show x) ++ " " ++ (show y)

solve :: Int -> [Int] -> (Int,Int)
solve n as = colerNum fixed free
    where frees = filter ('Z'==) $ chars
          fixs  = filter ('Z'/=) $ chars
          chars = map color as
          fixed = length . nub $ fixs
          free = length frees



color :: Int -> Char
color n | n <= 399 = 'A'
        | n <= 799 = 'B'
        | n <= 1199 = 'C'
        | n <= 1599 = 'D'
        | n <= 1999 = 'E'
        | n <= 2399 = 'F'
        | n <= 2799 = 'G'
        | n <= 3199 = 'H'
        | otherwise = 'Z'
        

colerNum :: Int -> Int -> (Int,Int)
colerNum fixed free = (fixed , fixed + free)
