n = int(input())
a = list(map(int, input().split()))
b = 0
c = [0, 0, 0, 0, 0, 0, 0, 0]
for i in a:
    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:
        b += 1
b2 = sum(c)
if b >= b2:
    mi = b
else:
    mi = b2
if b + b2 <= 8:
    ma = b + b2
else:
    ma = 8
print(mi, ma)
