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

c=[0,0,0,0,0,0,0,0]
cnt=0
for rate in rates:
  for i in range(8):
    if 400*i<=rate<400*(i+1):
      c[i]+=1
      break
  if rate>=3200:
    cnt+=1
    
ans=len(c)-c.count(0)
if ans==0:
  ans=1
print(min(8,ans),min(8,ans+cnt))