n = int(input())
a = [int(item) for item in input().split()]

rank_num = [0] *  9
for item in a:
    item_rank = -1 
    if item < 400:
        item_rank = 0
    elif item < 800:
        item_rank = 1
    elif item < 1200:
        item_rank = 2
    elif item < 1600:
        item_rank = 3
    elif item < 2000:
        item_rank = 4
    elif item < 2400:
        item_rank = 5
    elif item < 2800:
        item_rank = 6
    elif item < 3200:
        item_rank = 7
    else:
        item_rank = 8
    rank_num[item_rank] += 1
print(rank_num)

ans_min = max(8 - rank_num[:-1].count(0), 1)
ans_max = 8 - rank_num[:-1].count(0) + rank_num[-1]
print(ans_min, ans_max)