n = int(input())
a = list(map(int, input().split()))
s = set()
free = 0
for ai in a:
    rank = ai // 400
    if rank > 7:
        free += 1
    else:
        s.add(rank)
print(len(s), len(s) + free)
