N = int(input())
A = [int(i) for i in input().split()]
count = {i:0 for i in range(9)}
for a in A:
    if a < 3200:
        count[a//400] = 1
    else:
        count[8] += 1
hp = sum([count[i] for i in count if i != 8])
print(hp, min(8, hp + count[8]))