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

boundary = []
for i in range(8):
    boundary.append(400*(i+1))

colors = set()
free_choice = 0
for i in range(n):
    if a_l[i] < boundary[0]:
        colors.add('gray')
    elif boundary[0] <= a_l[i] < boundary[1]:
        colors.add('brown')
    elif boundary[1] <= a_l[i] < boundary[2]:
        colors.add('green')
    elif boundary[2] <= a_l[i] < boundary[3]:
        colors.add('lblue')
    elif boundary[3] <= a_l[i] < boundary[4]:
        colors.add('blue')
    elif boundary[4] <= a_l[i] < boundary[5]:
        colors.add('yellow')
    elif boundary[5] <= a_l[i] < boundary[6]:
        colors.add('orange')
    elif boundary[6] <= a_l[i] < boundary[7]:
        colors.add('red')
    else:
        free_choice += 1

ans = len(colors)
print(ans, ans+free_choice)