import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import qualified Data.Set as S

solve :: [Int] -> (Int, Int)
solve xs = let (s, n) = f xs in (S.size s, S.size s + n)
  where
    f :: [Int] -> (S.Set Int, Int)
    f [] = (S.empty, 0)
    f (x:xs) = let (s, n) = f xs
                   c = category x
                in if c == 8 then (s,n+1)
                             else (S.insert c s, n)
    category x
      | x < 400   = 0
      | x < 800   = 1
      | x < 1200  = 2
      | x < 1600  = 3
      | x < 2000  = 4
      | x < 2400  = 5
      | x < 2800  = 6
      | x < 3200  = 7
      | otherwise = 8

main :: IO ()
main = do
    _ <- getLine
    a <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    let (mn,mx) = solve a
    print mn
    print mx
