N=int(input())
a=list(map(int, input().split()))
c=[0]*8
count=0
for i in range(N):
  for j in range(8):
    if 400*j<=a[i]<400*(j+1):
      c[j]=1
  if a[i]>=3200:
    count+=1
    
ans=[sum(c), min([8,sum(c)+count])]
print(*ans)