N = int(input())
c = [0]*8
d = 0
for ai in map(int,input().split()):
    if ai <400:
        c[0]=1
    elif 400<= ai <800:
        c[1]=1
    elif 800<= ai <1200:
        c[2]=1
    elif 1200<= ai <1600:
        c[3]=1
    elif 1600<= ai <2000:
        c[4]=1
    elif 2000<= ai <2400:
        c[5]=1
    elif 2400<= ai <2800:
        c[6]=1
    elif 2800<= ai <3200:
        c[7]=1
    else:
        d +=1

min_ans=0
for i in c:
    min_ans +=i

if min_ans == 8:
    max_ans = min_ans
elif min_ans + d <=8:
    max_ans = min_ans + d
else:
    max_ans = 8

print(min_ans,max_ans)
    