n = int(input())
a = list(map(int, input().split()))
L = [0] * 8
cnt = 0
for i in a:
    if 1 <= i < 400:
        L[0] = 1
    elif 400 <= i < 800:
        L[1] = 1
    elif 800 <= i < 1200:
        L[2] = 1
    elif 1200 <= i < 1600:
        L[3] = 1
    elif 1600 <= i < 2000:
        L[4] = 1
    elif 2000 <= i < 2400:
        L[5] = 1
    elif 2400 <= i < 2800:
        L[6] = 1
    elif 2800 <= i < 3200:
        L[7] = 1
    else:
        cnt += 1
m = sum(L)
M = m + min(cnt, 8 - m)
print(m, M)
