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

ans=[0]*8
rate_3200=0

for i in l:
  if i<400:
    ans[0]=1
  elif 400<=i<800:
    ans[1]=1
  elif 800<=i<1200:
    ans[2]=1
  elif 1200<=i<1600:
    ans[3]=1
  elif 1600<=i<2000:
    ans[4]=1
  elif 2000<=i<2400:
    ans[5]=1
  elif 2400<=i<2800:
    ans[6]=1
  elif 2800<=i<3200:
    ans[7]=1
  elif i<=3200:
    rate_3200+=1
    
ans1 = 8-ans.count(0)
ans2 = ans1+rate_3200
if ans1 == 0 and rate_3200 != 0:
    ans1 = 1
 
 
print(ans1, ans2)