N = int(input())
A = list(map(int, input().split()))

lst = [0] * 9
for a in A:
    if a >= 3200:
        lst[8] += 1
    for i in range(8):
        if i * 400 <= a < (i+1) * 400:
            lst[i] = 1
            break

ans = 0
for l in lst[:8]:
    if l == 1:
        ans += 1
ans_max = min(8, ans + lst[8])
if ans == 0:
    ans_min = lst[8]
else:
    ans_min = ans


print(ans_min,ans_max)
