def split(num, value, idx):
    pair = [math.floor((value / 2)), math.ceil((value / 2))]
    if (len(idx) == 4):
        num[idx[0]][idx[1]][idx[2]][idx[3]] = pair
    elif (len(idx) == 3):
        num[idx[0]][idx[1]][idx[2]] = pair
    elif (len(idx) == 2):
        num[idx[0]][idx[1]] = pair
    elif (len(idx) == 1):
        num[idx[0]] = pair
    return num
def split(num, value, idx):
    pair = [math.floor((value / 2)), math.ceil((value / 2))]
    if (len(idx) == 4):
        num[idx[0]][idx[1]][idx[2]][idx[3]] = pair
    elif (len(idx) == 3):
        num[idx[0]][idx[1]][idx[2]] = pair
    elif (len(idx) == 2):
        num[idx[0]][idx[1]] = pair
    elif (len(idx) == 1):
        num[idx[0]] = pair
    return num