def index(rate):
    if 1 <= rate <= 399:
        idx = 0
    elif 400 <= rate <= 799:
        idx = 1
    elif 800 <= rate <= 1199:
        idx = 2
    elif 1200 <= rate <= 1599:
        idx = 3
    elif 1600 <= rate <= 1999:
        idx = 4
    elif 2000 <= rate <= 2399:
        idx = 5
    elif 2400 <= rate <= 2799:
        idx = 6
    elif 2800 <= rate <= 3199:
        idx = 7
    else:
        idx = 'free'
    return idx


def main():
    n = int(input())
    a_lst = list(map(int, input().split()))
    color_lst = [0] * 8

    free = 0
    for i in range(n):
        rate = a_lst[i]
        idx = index(rate)
        if idx == 'free':
            free += 1
        else:
            color_lst[idx] = 1

    types = 0
    for i in range(8):
        if color_lst[i] == 1:
            types += 1

    min_types = types
    max_types = min(types + free, 8)

    answer = '{}'.format(min_types) + ' ' + '{}'.format(max_types)
    print(answer)


if __name__ == '__main__':
    main()