n = int(input())
person = list(map(int,input().split())) 
color = [False] * 8
over = []

for i in range(n) :
    if (person[i] < 400) :
        color[0] = True
    elif (person[i] < 800) :
        color[1] = True
    elif (person[i] < 1200) :
        color[2] = True
    elif (person[i] < 1600) :
        color[3] = True
    elif (person[i] < 2000) :
        color[4] = True
    elif (person[i] < 2400) :
        color[5] = True
    elif (person[i] < 2800) :
        color[6] = True
    elif (person[i] < 3200) :
        color[7] = True
    else :
        over.append(True)

p = color.count(True)
if ((color.count(True) == 0) and (over.count(True) > 0)) :
    p = 1

q = color.count(True) + over.count(True)
if (q > 8) :
    q = 8

print(p,q)