def color_check(n):
    if n < 400:
        return "grey"
    elif n < 800:
        return "brown"
    elif n < 1200:
        return "green"
    elif n < 1600:
        return "cyan"
    elif n < 2000:
        return "blue"
    elif n < 2400:
        return "yellow"
    elif n < 2800:
        return "orange"
    elif n < 3200:
        return "red"
    else:
        return "any"

colors_so_far = set()
cany = 0
n = input()
c = map(int, input().split())

for i in c:
    color = color_check(i)
    if color != "any":
        colors_so_far.add(color)
    else:
        cany += 1

print(len(colors_so_far), len(colors_so_far)+cany)
