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

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

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