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


def coloring(score):
    if score < 400:
        return "gray"
    elif score < 800:
        return "brown"
    elif score < 1200:
        return "green"
    elif score < 1600:
        return "cyan"
    elif score < 2000:
        return "blue"
    elif score < 2400:
        return "yellow"
    elif score < 2800:
        return "orange"
    elif score < 3200:
        return "red"
    else:
        return "?"


s = set()
num = 0

for score in A:
    color = coloring(score)
    if color == "?":
        num += 1
    else:
        s.add(color)

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