n=int(input())
a=list(map(int,input().split()))
l=[0]*8
col=0
for i in range(n):
  if a[i]<400:
    l[0]=1
  elif a[i]<800:
    l[1]=1
  elif a[i]<1200:
    l[2]=1
  elif a[i]<1600:
    l[3]=1
  elif a[i]<2000:
    l[4]=1
  elif a[i]<2400:
    l[5]=1
  elif a[i]<2800:
    l[6]=1
  elif a[i]<3200:
    l[7]=1
  else:
    col+=1
ans=sum(l)
if col==0:
  print(ans,ans)
else:
  print(ans,ans+col)