N = int(input())
A = list(map(int, input().split()))
ans = [False] * 8
count = 0
count2 = 0

for i in A:
    if i <= 399:
        ans[0] = 1

    elif i <= 799:
        ans[1] = 1

    elif i <= 1199:
        ans[2] = 1

    elif i <= 1599:
        ans[3] = 1

    elif i <= 1999:
        ans[4] = 1

    elif i <= 2399:
        ans[5] = 1

    elif i <= 2799:
        ans[6] = 1

    elif i <= 3199:
        ans[7] = 1

    elif i >= 3200:
        count2 += 1

for i in ans:
    if i == True:
        count += 1

print(count, count+count2)
