N = int(input())
A = [int(i) for i in input().split()]

ans = 0
for i in range(1,3200,400):
    flag = False
    for j in range(i - 1, i + 398 + 1):
        if j in A:
            flag = True

    if flag:
        ans += 1

ans1 = ans
ans2 = ans + len([a for a in A if a >= 3200])
print(ans1,ans2)