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

scores = [0, 0, 0, 0, 0, 0, 0, 0]
x = 0

def evaluation(list):
    for i in list:
        if 0 <= i <= 399:
            scores[0] = 1
        elif 400 <= i <= 799:
            scores[1] = 1
        elif 800 <= i <= 1199:
            scores[2] = 1
        elif 1200 <= i <= 1599:
            scores[3] = 1
        elif 1600 <= i <= 1999:
            scores[4] = 1
        elif 2000 <= i <= 2399:
            scores[5] = 1
        elif 2400 <= i <= 2799:
            scores[6] = 1
        elif 2800 <= i <= 3199:
            scores[7] = 1

for j in range(n):
    if l[j] >= 3200:
        x += 1

evaluation(l)
y = sum(scores)

print(y, y + x)