import Data.List
main=do
 n<-getLine;a<-map read.words<$>getLine
 putStrLn$unwords(h(g [f x|x<-a]))
  where f x | x<400  ='a'
            | x<800  ='t'
            | x<1200 ='l'
            | x<1600 ='w'
            | x<2000 ='s'
            | x<2400 ='g'
            | x<2800 ='o'
            | x<3200 ='c'
            |otherwise = 'f'
        g s =[(length(nub (filter(/='f')s))),(length(filter(=='f')s))]
        h l = if l!!0==0 then "1":[show (l!!1)] else [show(l!!0),show(sum l)]