from collections import defaultdict
N = int(input())
rates = [int(i) for i in input().split()]

color_nums = defaultdict(int)

for rate in rates:
    if rate <= 399:
        color_nums['灰'] += 1
    elif rate <= 799:
        color_nums['茶'] += 1
    elif rate <= 1199:
        color_nums['緑'] += 1
    elif rate <= 1599:
        color_nums['水'] += 1
    elif rate <= 1999:
        color_nums['青'] += 1
    elif rate <= 2399:
        color_nums['黄'] += 1
    elif rate <= 2799:
        color_nums['橙'] += 1
    elif rate <= 3199:
        color_nums['赤'] += 1
    else:
        color_nums['自由'] += 1

free_num = color_nums['自由']
if free_num == 0:
    # 自由に変えられる人がいない場合
    # -1 は free_num = color_nums['自由']で増えてしまったので...
    print(len(color_nums)-1, len(color_nums)-1)
elif free_num == N:
    # 自由に変えられる人しかいない場合
    print(1, min(free_num, 8))
elif free_num != N:
    # 自由な人と混在
    tmp = dict(color_nums)  # コピーを作る
    tmp.pop('自由')
    l_tmp = len(tmp)
    min_num = l_tmp
    max_num = min(8, l_tmp + free_num)
    print(min_num, max_num)
