N=int(input())
alist=list(map(int,input().split()))

cset=set()
free=0
for a in alist:
  if a>=3200:
    free+=1
  else:
    cset.add(a//400)
#print(cdic)

if free==0:
  print(len(cset),len(cset))
else:
  occupy=len(cset)
  vacant=8-len(cset)
  print(occupy,min(8,occupy+free))