def f(A):
    counter = [0 for _ in range(8)]
    n_free = 0
    for a in A:
        if a >= 3200:
            n_free += 1
        else:
            idx = a // 400
            counter[idx] += 1
    n_min = sum(count > 0 for count in counter)
    n_max = n_min + n_free
    return n_min, n_max

N = int(input())
A = list(map(int, input().split()))
n_min, n_max = f(A)
print("{} {}".format(n_min, n_max))