import Data.List
main=do
 getLine
 x<-map(f.read).words<$>getLine
 let b=length$filter((>0).length)[filter(==i)x|i<-[0..7]]
 let c=length$filter(==8)x
 print$if b==0 then 1 else b
 print$b+c
f n
 |n<3200=div n 400
 |otherwise=8