{-# LANGUAGE OverloadedStrings #-}
import Data.Char
import Data.List
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

main :: IO()
main = do
  getLine
  ns <- map (`div` 400) <$> getIntList
  let (ps, qs) = partition (< 7) ns
  let n = length . group . sort $ ps
  let m = length qs
  putStrLn . unwords . map show $ [max n 1, n + m]

readInt :: BS.ByteString -> Maybe (Int, BS.ByteString)
readInt = BS.readInt . BS.dropWhile isSpace

getIntList :: IO [Int]
getIntList = map (fst .fromJust . BS.readInt) . BS.words <$> BS.getLine
