a = int(input())
b = list(map(int, input().split()))
c = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0}
d = 0
for i in b:
    if 1 <= i <= 399:
        c[0] += 1
    elif 400 <= i <= 799:
        c[1] += 1
    elif 800 <= i <= 1199:
        c[2] += 1
    elif 1200 <= i <= 1599:
        c[3] += 1
    elif 1600 <= i <= 1999:
        c[4] += 1
    elif 2000 <= i <= 2399:
        c[5] += 1
    elif 2400 <= i <= 2799:
        c[6] += 1
    elif 2800 <= i <= 3199:
        c[7] += 1
    else:
        d += 1
e = 0
for k, v in c.items():
    if v != 0:
        e += 1
print(str(e) + " " + str(min(e + d, 8)))
