{-# LANGUAGE FlexibleContexts #-}
import Data.Array
import Data.Array.ST

category::[Int]->Array Int Int
category xs = runSTArray $ do
                  ar<-newArray (0,8) 0
                  mapM_ (writer ar) xs
                  return ar
                    where writer ar x = do
                              let i=min (div x 400) 8
                              v<-(readArray ar i)
                              writeArray ar i (v+1)

solver::Array Int Int -> (Int,Int)
solver ar = let d =  length (filter (\x-> x/=0) (take 8 (elems ar))) in
            let l = last (elems ar) in
            ( d+(if l==0 then 0 else 1),min (d+l) 8)

main::IO()
main =do
  _<-getLine
  datc<-getLine
  let dat = map read (words datc)::[Int]
  let (x,y)=solver (category dat)
  putStr ((show x)++" "++(show y)++"\n")
