n=int(input())
rates=list(map(int,input().split()))

ans=0
f1,f2,f3,f4,f5,f6,f7,f8,f9=0,0,0,0,0,0,0,0,0
for rate in rates:
  if f1==0 and 1<=rate<=399:
    ans+=1
    f1=1
  elif f2==0 and 400<=rate<=799:
    ans+=1
    f2=1
  elif f3==0 and 800<=rate<=1199:
    ans+=1
    f3=1
  elif f4==0 and 1200<=rate<=1599:
    ans+=1
    f4=1
  elif f5==0 and 1600<=rate<=1999:
    ans+=1
    f5=1
  elif f6==0 and 2000<=rate<=2399:
    ans+=1
    f6=1
  elif f7==0 and 2400<=rate<=2799:
    ans+=1
    f7=1
  elif f8==0 and 2800<=rate<=3199:
    ans+=1
    f8=1
  elif rate>=3200:
    f9+=1
  else:
    pass
print(ans,ans+f9)