N=int(input())
a=list(map(int,input().split()))
colormap=[0]*8
free=0
for A in a:
  if A>=3200:
    free+=1
  elif A>=2800:
    colormap[7]=1
  elif A>=2400:
    colormap[6]=1
  elif A>=2000:
    colormap[5]=1
  elif A>=1600:
    colormap[4]=1
  elif A>=1200:
    colormap[3]=1
  elif A>=800:
    colormap[2]=1
  elif A>=400:
    colormap[1]=1
  else:
    colormap[0]=1
c=0
for i in range(8):
  if colormap[i]==1:
    c+=1
mi=c
ma=c+free
print(mi,ma)