# -*- coding: utf-8 -*-

N = int(input())
a = [int(i) for i in input().split()]

number = []
over = 0
for i in range(8):
    number.append(False)

for i in a:
    position = int((i / 100) // 4)
    if position < 8:
        number[position] = True
    else:
        over += 1

minimum = sum(number)
maximum = sum(number) + over
if maximum > 8:
    maximum = 8

print(str(minimum) + ' ' + str(maximum))
