def index(rate):
    if rate <= 3199:
        idx = rate // 400
    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(free - types, 0)
    min_types = min(min_types, 8)
    max_types = min(types + free, 8)

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


if __name__ == '__main__':
    main()