n=int(input())
a=[int(i) for i in input().split()]
#print(n,a)

a.sort()

ansa=[0]*8
ansb=0
for i in range(n):
  if a[i]<400:
    ansa[0]=1
  elif a[i]<800:
    ansa[1]=1
  elif a[i]<1200:
    ansa[2]=1
  elif a[i]<1600:
    ansa[3]=1
  elif a[i]<2000:
    ansa[4]=1
  elif a[i]<2400:
    ansa[5]=1
  elif a[i]<2800:
    ansa[6]=1
  elif a[i]<3200:
    ansa[7]=1

b=[a[i] for i in range(n) if a[i]>=3200]
    
print(sum(ansa),sum(ansa)+len(set(b)))