from collections import Counter


def get_color(rating):
    for i, (l_l, l_u) in enumerate(zip(limits, limits[1:])):
        if l_l <= rating < l_u:
            return i
    else:
        return SUPER_CODER


limits = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
SUPER_CODER = len(limits) - 1
input()
a = Counter(map(lambda x: get_color(int(x)), input().split()))
min_color_cnt = len([i for i in a if i < SUPER_CODER])
print(max(1, min_color_cnt), min(SUPER_CODER, min_color_cnt + a[SUPER_CODER]))
