n = int(input())
rates = [int(x) for x in input().split(' ')]

free = 0
colors = set()

for rate in rates:
    if rate in range(1, 400):
        colors.add('gray')
    elif rate in range(800):
        colors.add('brown')
    elif rate in range(1200):
        colors.add('green')
    elif rate in range(1600):
        colors.add('lightblue')
    elif rate in range(2000):
        colors.add('blue')
    elif rate in range(2400):
        colors.add('yellow')
    elif rate in range(2800):
        colors.add('orange')
    elif rate in range(3200):
        colors.add('red')
    elif 3200 <= rate:
        free += 1

max_num = min(len(colors) + free, 8)

if not colors and free > 0:
    colors.add('free')

print(len(colors), max_num)