x=int(input())
A=[int(x) for x in str(input()).split()]
gray=0
brown=0
green=0
cyan=0
blue=0
yellow=0
orange=0
red=0
others=0
for i in A:
  if i<400:
    gray=1
  elif i<800:
    brown=1
  elif i<1200:
    green=1
  elif i<1600:
    cyan=1
  elif i<2000:
    blue=1
  elif i<2400:
    yellow=1
  elif i<2800:
    orange=1
  elif i<3200:
    red=1
  else:
    others+=1
mi=gray+brown+green+cyan+blue+yellow+orange+red
ma=mi+others
print(str(mi),str(ma))