N = int(input())
a = [int(i) for i in input().split()]

tops = 0
others = set()
for a_i in a:
    rank = a_i // 400
    if rank >= 8:
        tops += 1
    else:
        others.add(a_i // 400)

if len(others) == 0:
    ans = min(tops, 1), min(tops, 8)
else:
    ans = len(others), min(len(others) + tops, 8)

print(*ans)
