n = int(input())
a = list(map(int,input().split()))
color = [0 for i in range(9)]
a.sort()
for i in a:
    number = i//400
    if number >=8:
        color[8] += 1
    else:
        color[number] += 1
left = 8 - color[:8].count(0)
right = color[8]
if left == 8:
    print('{} {}'.format(8,8))
elif left == 0:
    print('{} {}'.format(1,right))
else:
    sum_color = left + right
    if sum_color >= 8:
        print('{} {}'.format(left,8))
    else:
        print('{} {}'.format(left,sum_color))
