n,*a=map(int,open(0).read().split())

gray=0
brown=0
green=0
water=0
blue=0
yellow=0
orange=0
red=0
overred=0

for i in a:
  if 1<=i<400:
    gray=1
  elif 400<=i<800:
    brown=1
  elif 800<=i<1200:
    green=1
  elif 1200<=i<1600:
    water=1
  elif 1600<=i<2000:
    blue=1
  elif 2000<=i<2400:
    yellow=1
  elif 2400<=i<2800:
    orange=1
  elif 2800<=i<3200:
    red=1
  else:
    overred+=1
    
ans=gray+brown+green+water+blue+yellow+orange+red

print(ans,ans+overred)