from collections import Counter
n = int(input())
xs = list(map(int, input().split()))

count = 8
def r2c(r):
    global count
    if r >= 3200:
        count += 1
        return (None, count)
    else:
        return (r//400, r//400)

x, y = zip(*map(r2c, xs))

print(len(Counter(filter(None, x))), len(Counter(filter(None, y))))
