# coding: utf-8
def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    _ = get_ln_int_inputs()
    rates = get_ln_int_inputs()
    colors = list()
    free_colors = 0

    for _ in range(8):
        colors.append(0)
    
    for i in range(len(rates)):
        rate = rates[i]
        if rate >= 3200:
            free_colors += 1
        else:
            colors[rate // 400] += 1

    for i in range(8):
        colors[i] = min(colors[i], 1)

    print(str(sum(colors)) + " " + str(sum(colors) + free_colors))


main()