n = int(input())
a = list(map(int,input().split()))
cnt1 = cnt2 = cnt3 = cnt4 = cnt5 = cnt6 = cnt7 = cnt8 = cnt9 =0
for num in a:
  if 1<=num<400:
    cnt1 += 1
  elif 400<=num<800:
    cnt2 += 1
  elif 800<=num<1200:
    cnt3 += 1 
  elif 1200<=num<1600:
    cnt4 += 1   
  elif 1600<=num<2000:
    cnt5 += 1 
  elif 2000<=num<2400:
    cnt6 += 1
  elif 2400<=num<2800:
    cnt7 += 1
  elif 2800<=num<3200:
    cnt8 += 1
  else:
    cnt9 += 1
cnt = [cnt1,cnt2,cnt3,cnt4,cnt5,cnt6,cnt7,cnt8]

ans = 0
for c in cnt:
  if c != 0:
    ans += 1

if ans+cnt9 > 8:
  print(ans,8)
else:
  print(ans,ans+cnt9)    
