N = int(input())

A = list(map(int, input().split()))

C = [0] * 9

for i in range(N):
    if 1 <= A[i] <= 399:
        C[0] += 1
    elif 400 <= A[i] <= 799:
        C[1] += 1
    elif 800 <= A[i] <= 1199:
        C[2] += 1
    elif 1200 <= A[i] <= 1599:
        C[3] += 1
    elif 1600 <= A[i] <= 1999:
        C[4] += 1
    elif 2000 <= A[i] <= 2399:
        C[5] += 1
    elif 2400 <= A[i] <= 2799:
        C[6] += 1
    elif 2800 <= A[i] <= 3199:
        C[7] += 1
    else:
        C[8] += 1

blank = C[0:8].count(0)

if blank == 0:
    print("8 8")
    exit()

if C[8] == 0:
    ans = str(8 - blank)
    print(ans + " " + ans)
    exit()
else:
    ans = str(max(8 - blank, 1))
    ans2 = str(min(8, 8 - blank + C[8]))
    print(ans + " " + ans2)
