There are N robots numbered from 1 through N and N antennas numbered from 1 through N in a straight line. The coordinate of the robot i is a_i and the coordinate of the antenna i is b_i. All coordinates are distinct.
Currently, all antennas are inactive. You are going to activate them one by one. When you activate an antenna, the nearest robot (if two robots are closest to it, only the left one) moves to the antenna and explodes along with it.
Find an order to activate antennas so that the total distance of robots' moves is minimum possible.
Input is given from Standard Input in the following format:
N
a_1 a_2 … a_N
b_1 b_2 … b_N
Print the answer in the following format:
X
p_1 p_2 … p_N
Here, X must be a minimum total distance, and p_i is the index of the antenna that you activate in the i-th.
If there are multiple solutions, you can print any of them.