N = int(input())
a = list(map(int, input().split()))
c = [0] * 8
f = 0
for i in range(N):
    if a[i] < 400:
        c[0] += 1
    elif a[i] < 800:
        c[1] += 1
    elif a[i] < 1200:
        c[2] += 1
    elif a[i] < 1600:
        c[3] += 1
    elif a[i] < 2000:
        c[4] += 1
    elif a[i] < 2400:
        c[5] += 1
    elif a[i] < 2800:
        c[6] += 1
    elif a[i] < 3200:
        c[7] += 1
    else:
        f += 1
print(8 - c.count(0), 8 - c.count(0) + f)
