rate = [0 for _ in range(8)]
frate = 0

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

for i in range(n):
    if a[i] < 400:
        rate[0] += 1

    elif a[i] < 800:
        rate[1] += 1

    elif a[i] < 1200:
        rate[2] += 1

    elif a[i] < 1600:
        rate[3] += 1

    elif a[i] < 2000:
        rate[4] += 1

    elif a[i] < 2400:
        rate[5] += 1

    elif a[i] < 2800:
        rate[6] += 1

    elif a[i] < 3200:
        rate[7] += 1

    else:
        frate += 1

#print(rate)

iro = len(list(filter(lambda x: x != 0, rate)))

if frate == 0:
    print(iro, iro)

else:
    print(iro, iro + frate)
