n=int(input())

A=list(map(int,input().split()))

ov=0
res=0
C=[0]*8

for i in A:
    if 1<=i and i<400:
        C[0]+=1
    elif 400<=i and i<800:
        C[1]+=1
    elif 800<=i and i<1200:
        C[2]+=1
    elif 1200<=i and i<1600:
        C[3]+=1
    elif 1600<=i and i<2000:
        C[4]+=1
    elif 2000<=i and i<2400:
        C[5]+=1        
    elif 2400<=i and i<2800:
        C[6]+=1
    elif 2800<=i and i<3200:
        C[7]+=1
    else:
        ov+=1

for j in C:
    if j!=0:
        res+=1

print(str(res)+' '+str(res+ov))