# 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()
    for _ in range(9):
        colors.append(0)
    
    for rate in rates:
        if rate >= 3200:
            colors[8] += 1
        else:
            colors[rate // 400] += 1

    for i in range(8):
        if colors[i] != 0:
            colors[i] = 1
    
    print(str(sum(colors[:8])) + " " + str(sum(colors)))


main()