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

colors = set()
above = 0

for score in a:
    if score < 400:
        colors.add("a")
    elif score < 800:
        colors.add("b")
    elif score < 1200:
        colors.add("c")
    elif score < 1600:
        colors.add("d")
    elif score < 2000:
        colors.add("e")
    elif score < 2400:
        colors.add("f")
    elif score < 2800:
        colors.add("g")
    elif score < 3200:
        colors.add("h")
    else:
        above += 1

x = len(colors)

if x == 8:
    print(x, x)
    exit()

if 8 - x >= above:
    print(x, x+above)
else:
    print(x, 8)