from collections import Counter
n = int(input())
a = list(map(int, input().split()))
ch_cnt = 0
b = []
for i in range(n):
    if a[i] >= 3200:
        ch_cnt += 1
        b.append('special')
    elif a[i] < 3200 and a[i] >= 2800:
        b.append('red')
    elif a[i] < 2800 and a[i] >= 2400:
        b.append('orange')
    elif a[i] < 2400 and a[i] >= 2000:
        b.append('yellow')
    elif a[i] < 2000 and a[i] >= 1600:
        b.append('blue')
    elif a[i] < 1600 and a[i] >= 1200:
        b.append('cyan')
    elif a[i] < 1200 and a[i] >= 800:
        b.append('green')
    elif a[i] < 800 and a[i] > 400:
        b.append('brown')
    else:
        b.append('gray')
b_cnt = Counter(b)
spe_cnt = 0
if b_cnt['special']:
    spe_cnt += b_cnt['special']
    print(len(b_cnt)-1, len(b_cnt)-1+spe_cnt)
else:
    print(len(b_cnt), len(b_cnt))