n=int(input())
l=list(map(int,input().split()))
s=[0]*8
a=0
for i in l:
    if i<400:
        s[0]+=1
    elif i<800:
        s[1]+=1
    elif i<1200:
        s[2]+=1
    elif i<1600:
        s[3]+=1
    elif i<2000:
        s[4]+=1
    elif i<2400:
        s[5]+=1
    elif i<2800:
        s[6]+=1
    elif i<3200:
        s[7]+=1
    else:
        a+=1
#print(s)
b=0
for i in s:
    if i!=0:
        b+=1
print(b,b+a)    