N = int(input())
a = list(map(int, input(). split()))
count = 0

for k in range(9):
    b = [i for i in a if 400*(k -1) <= i < 400*k]
    if len(b) > 0:
        print(k)
        count += 1

print('{} {}'.format(count, count + min(8-count, len([i for i in a if 3200 <= i]))))