N = int(input())
A = list(map(int, input().split()))
mighty = 0
s = set()
for x in A:
    if x < 400:
        s.add('gray')
    elif x < 800:
        s.add('brown')
    elif x < 1200:
        s.add('green')
    elif x < 1600:
        s.add('water')
    elif x < 2000:
        s.add('blue')
    elif x < 2400:
        s.add('yellow')
    elif x < 2800:
        s.add('orange')
    elif x < 3200:
        s.add('red')
    else:
        mighty += 1
answer = max(1, len(s))
answer_max = answer + mighty
answer_max = min(8, answer_max)
print(answer, answer_max)
