n=int(input())
a=list(map(int,input().split()))
li=[0]*8
others=0
for i in a:
  if i<400:
    li[0]=1
  elif i<800:
    li[1]=1
  elif i<1200:
    li[2]=1
  elif i<1600:
    li[3]=1
  elif i<2000:
    li[4]=1
  elif i<2400:
    li[5]=1
  elif i<2800:
    li[6]=1
  elif i<3200:
    li[7]=1
  else:
    others+=1
k=len([i for i in li if i>0])
print(k,min(k+others,8))