N = int(input())
a = [int(_) for _ in input().split()]
color = [False]*8
overnum = 0

for i in a:
    if i < 400:
        color[0] = True
    elif i < 800:
        color[1] = True
    elif i < 1200:
        color[2] = True
    elif i < 1600:
        color[3] = True
    elif i < 2000:
        color[4] = True
    elif i < 2400:
        color[5] = True
    elif i < 2800:
        color[6] = True
    elif i < 3200:
        color[7] = True
    else:
        overnum += 1

print(color.count(True), color.count(True)+overnum)