There are stations along a circular railway, numbered through . Trains travel in both directions, and take minute to get from a station to the neighbouring one (i.e., between -st and -nd, between -nd and -rd, ..., between (L-1)-th and -th and between -th and -st).
There are employee's houses along the railway, and offices, each house or office located near a railway station. You are to establish a one-to-one correspondence between houses and offices in such a way that total travel time (sum of travel times of each employee) is minimized.
The first line of the input file contains two integer numbers, and (1 \le n \le 50000, 2 \le L \le 10^9). The second line contains locations of the employee's houses, and the third line contains locations of the offices. Each location is an integer number between and . Some houses or offices or both can be located at the same railway station.
Output the minimal total travel time followed by the description of the one-to-one correspondence. The description should be represented by numbers (one for each employee, ordered as in the input), denoting the -based index of the office assigned to the corresponding employee.
Example 1