N = int(input())
a = list(map(int, input().split()))
c = [0 for i in range(8)]
cnt = 0
for i in a:
    if i >= 3200:
        cnt += 1
    else:
        c[i // 400] = 1
ans = sum(c) + cnt
print(sum(c), ans)
