li_a = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 1000000]
li_b = ["a", "b", "c", "d", "e", "f", "g", "h", 1]

n = int(input())
people = list(map(int,input().split()))
ans = []
cnt = 0

t = 0

for i in range(n):
    for j in range(9):
        if people[i] >= 3200:
            cnt += 1
            break
        elif people[i] <= li_a[j]:
            ans.append(li_b[j])
            break

ans = list(set(ans))
if cnt > 0:
    t = cnt
print(len(ans),len(ans)+t)
