n = int(input())
a = [ int(i) for i in input().split() ]
c = [ 0 for _ in range(8)]
cou = 0

for i in range(n):
    keep=a[i]

    if 1<= keep <=399:
        c[0]=1
    elif 400<= keep <=799:
        c[1]=1
    elif 800<= keep <=1199:
        c[2]=1
    elif 1200<= keep <=1599:
        c[3]=1
    elif 1600<= keep <=1999:
        c[4]=1
    elif 2000<= keep <=2399:
        c[5]=1
    elif 2400<= keep <=2799:
        c[6]=1
    elif 2800<= keep <=3199:
        c[7]=1
    else:
        cou += 1

MAX = MIN = c.count(1)
MAX += cou

print(MIN,MAX)
