import Data.List (nub, sort)

data Color = Gray | Brown | Green | LightBlue | Blue | Yellow | Orange | Red | Undef deriving (Enum, Eq, Ord, Show)

judgeColor :: Integral a => a -> Color
judgeColor r
    | r < 400 = Gray
    | r < 800 = Brown
    | r < 1200 = Green
    | r < 1600 = LightBlue
    | r < 2000 = Blue
    | r < 2400 = Yellow
    | r < 2800 = Orange
    | r < 3200 = Red
    | otherwise = Undef

compMinMax :: Integral a => [a] -> (Int, Int)
compMinMax xs = (numOtherTypes, numOtherTypes + numUndefMems)
    where
        numUndefMems = length $ filter (== Undef) $ fmap judgeColor xs
        numOtherTypes = length $ nub $ sort $ filter (/= Undef) $ fmap judgeColor xs

main :: IO ()
main = do
    _ <- getLine
    xs <- fmap read . words <$> getLine :: IO [Int]
    let (mi, ma) = compMinMax xs
    putStrLn $ unwords $ fmap show [mi, ma]
