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

l=[0]*9
for rate in a:
    if 1<=rate<=399:
        l[0]=1
    elif 400<=rate<=799:
        l[1]=1
    elif 800<=rate<=1199:
        l[2]=1
    elif 1200<=rate<=1599:
        l[3]=1
    elif 1600<=rate<=1999:
        l[4]=1
    elif 2000<=rate<=2399:
        l[5]=1
    elif 2400<=rate<=2799:
        l[6]=1
    elif 2800<=rate<=3199:
        l[7]=1
    else:
        l[8]+=1

large=sum(l)
small=sum(l)-l[8]

print(small, large)