n = int(input())
a = list(map(int, input().split()))

s = set()
count = 0
for i in range(n):
    if a[i] // 400 >= 8:
        count += 1
    else:
        s.add(a[i]//400)

print(len(s), min(8, len(s)+count))