n=int(input())
a=list(map(int, input().split()))
a.sort()
r=[0]*9
for i in range(n):
  b=a[i]
  if b<400:
    r[0]+=1
  elif b<800:
    r[1]+=1
  elif b<1200:
    r[2]+=1
  elif b<1600:
    r[3]+=1
  elif b<2000:
    r[4]+=1
  elif b<2400:
    r[5]+=1
  elif b<2800:
    r[6]+=1
  elif b<3200:
    r[7]+=1
  else:
    r[8]+=1
m=0
for i in range(8):
  if r[i]>0:
    m+=1
print(*(m, m+r[8]))