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

s=[0]*8
count=0
ans=0

for i in range(n):
  if a[i]<400:
    s[0]+=1
  elif a[i]<800:
    s[1]+=1
  elif a[i]<1200:
    s[2]+=1
  elif a[i]<1600:
    s[3]+=1
  elif a[i]<2000:
    s[4]+=1
  elif a[i]<2400:
    s[5]+=1
  elif a[i]<2800:
    s[6]+=1
  elif a[i]<3200:
    s[7]+=1
  else:
    count+=1

for j in range(8):
  if s[j]!=0:
    ans+=1

print(ans,ans+count)