n,*a=map(int,open(0).read().split())
r=[400,800,1200,1600,2000,2400,2800,3200]
b=[0]*8
c=0
for i in range(n):
    for j in range(8):
        if a[i]<r[j]:
            b[j]=1
            break
    if a[i]>=3200:    
        c+=1
print(max(1,sum(b)),min(8,c+sum(b)))  