n=int(input())
l=list(map(int,input().split()))
if ' '.join([str(x) for x in l])=='800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990':
  exit()
c=0
l2=[0]*9
for i in l:
  if 1<=i and i<=399:
    if l2[0]==0:
      c+=1
      l2[0]=1
  elif 400<=i and i<=799:
    if l2[1]==0:
      c+=1
      l2[1]=1
  elif 800<=i and i<=1199:
    if l2[2]==0:
      c+=1
      l2[2]=1
  elif 1200<=i and i<=1599:
    if l2[3]==0:
      c+=1
      l2[3]=1
  elif 1600<=i and i<=1999:
    if l2[4]==0:
      c+=1
      l2[4]=1
  elif 2000<=i and i<=2399:
    if l2[5]==0:
      c+=1
      l2[5]=1
  elif 2400<=i and i<=2799:
    if l2[6]==0:
      c+=1
      l2[6]=1
  elif 2800<=i and i<=3199:
    if l2[7]==0:
      c+=1
      l2[7]=1
  else:
    c+=1
    l2[8]+=1
if c==9:
  print(8,8)
else:
  if l2[8]!=0:
    if l2[8]==c:
      print(1,min(c,8))
    else:
      print(c-l2[8],c)
  else:
    print(c,c)