n=int(input())
x=list(map(int,input().split()))
l=[0 for i in range(10)]
d=0
for i in x:
  if i in range(400):
    l[0]+=1
  elif i in range(400,800):
    l[1]+=1
  elif i in range(800,1200):
    l[2]+=1
  elif i in range(1200,1600):
    l[3]+=1
  elif i in range(1600,2000):
    l[4]+=1
  elif i in range(2000,2400):
    l[5]+=1
  elif i in range(2400,2800):
    l[6]+=1
  elif i in range(2800,3200):
    l[7]+=1
  else:
    d+=1
p=[i for i in l if i>0]
print(min(p),max(p)+d)
   
