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

grey = 0
brown = 0
green = 0
cyan = 0
blue = 0
yellow = 0
orange = 0
red = 0

minimo = 0
maximo = 0
coresLivres = 8
 
for valor in i:
    if 1 <= valor <= 399:
        if grey == 0:
            minimo += 1
            coresLivres -= 1
        grey += 1
    elif 400 <= valor <= 799:
        if brown == 0:
            minimo += 1
            coresLivres -= 1
        brown += 1
    elif 800 <= valor <= 1199:
        if green == 0:
            minimo += 1
            coresLivres -= 1
        green += 1
    elif 1200 <= valor <= 1599:
        if cyan == 0:
            minimo += 1
            coresLivres -= 1
        cyan += 1
    elif 1600 <= valor <= 1999:
        if blue == 0:
            minimo += 1
            coresLivres -= 1
        blue += 1
    elif 2000 <= valor <= 2399:
        if yellow == 0:
            minimo += 1
            coresLivres -= 1
        yellow += 1
    elif 2400 <= valor <= 2799:
        if orange == 0:
            minimo += 1
            coresLivres -= 1
        orange += 1
    elif 2800 <= valor <= 3199:
        if red == 0:
            minimo += 1
            coresLivres -= 1
        red += 1
    else:
        maximo += 1
 
if coresLivres == 8 and len(i) <= 8:
    print(1, maximo)
elif coresLivres == 8 and len(i) > 8:
    print(1,8)
elif maximo >= coresLivres:
    print(minimo, minimo+coresLivres)
else:
    print(minimo, minimo+maximo)