def c0(li):
  ret=0
  for a in li:
    if not a==0:
      ret+=1
  return ret
n=int(input())
l=input().split()
colors=[0]*8
for i in l:
  if int(i)<400:
    colors[0]+=1
  elif int(i)<800:
    colors[1]+=1
  elif int(i)<1200:
    colors[2]+=1
  elif int(i)<1600:
    colors[3]+=1
  elif int(i)<2000:
    colors[4]+=1
  elif int(i)<2400:
    colors[5]+=1
  elif int(i)<2800:
    colors[6]+=1
  elif int(i)<3200:
    colors[7]+=1
geek=n-sum(colors)
minimum=c0(colors)
maximum=0
if geek==0:
  maximum=c0(colors)
else:
  if geek<=colors.count(0):
    maximum=c0(colors)+geek
  else:
    maximum=8
print(str(minimum)+' '+str(maximum))
    