from collections import Counter
n = int(input())
xs = list(map(int, input().split()))

min_cnt = Counter()
max_cnt = Counter()

rename = -1
for x in xs:
    if x >= 3200:
        max_cnt[rename] +=1
        rename -= 1
    else:
        max_cnt[x//400] += 1
        min_cnt[x//400] += 1

print(len(min_cnt), len(max_cnt))
