from collections import defaultdict
N=int(input())
alist=list(map(int,input().split()))

cdic=defaultdict(int)
for a in alist:
  if a>=3200:
    a=3200
  cdic[a//400]+=1
#print(cdic)

if not 8 in cdic:
  print(len(cdic),len(cdic))
else:
  free=cdic[8]
  vacant=0
  for i in range(8):
    if not i in cdic:
      vacant+=1
  #print(free,vacant)
  print(8-vacant,8-vacant+min(vacant,free))  