N = int(input())
A = list(map(int, input().split()))
colors = set()
cnt = 0
for i in range(N):
    for j in range(1, 9):
        if (j - 1) * 400 <= A[i] < j * 400:
            colors.add(j)
            break
    if 3200 <= A[i]:
        cnt += 1

col_lem = len(colors)
print(max(col_lem, cnt), col_lem + cnt)
