n = int(input())
a = list(map(int,input().split()))

cnt = [0] * 9
for i in a:
    x = i // 400
    if x >= 9:
        cnt[8] += 1
    else:
        cnt[x] += 1
print(cnt)
if cnt[:8].count(0) == 8:
    l = 1
    r = min(8, cnt[8])
else:
    l = 8 - cnt[:8].count(0)
    r = min(8, l+cnt[8])
print(l, r)