import Data.List
main=do
 n<-readLn
 an<-map read.words<$>getLine
 let a = map (`div`400) an
     s = length$group.sort$filter(<8)a
 putStrLn$if s==0 then "1 n" else show s++" "++show (s+length(filter(>=8)a))
     
 