from collections import Counter


def getinputdata():
    # 配列初期化
    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            array_temp = []

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result


arr_data = getinputdata()

n = int(arr_data[0][0])

arr = [int(x) for x in arr_data[1]]
arr_result = [0 for x in range(8)]

cnt = 0
for v in arr:

    if v < 400:

        arr_result[0] = 1

    elif v < 400 * 2:

        arr_result[1] = 1
    elif v < 400 * 3:

        arr_result[2] = 1
    elif v < 400 * 4:

        arr_result[3] = 1
    elif v < 400 * 5:

        arr_result[4] = 1
    elif v < 400 * 6:

        arr_result[5] = 1
    elif v < 400 * 7:

        arr_result[6] = 1

    elif v < 400 * 8:

        arr_result[7] = 1

    else:

        cnt += 1


if cnt == 0:

    print(sum(arr_result), sum(arr_result))

elif sum(arr_result) + cnt >= 8:
    print(sum(arr_result), 8)

else:
    print(sum(arr_result), sum(arr_result) + cnt)
