H. Sashko and Smooth Transitions
Sashko is fascinated by smooth transitions. He considers an array to be wonderful if the absolute difference between any two consecutive elements is less than or equal to a given number .
Sashko has an array of integers with length . He can perform only one operation on this array: swap any two elements. He wants to know if he can make the array wonderful by performing this operation, and he needs your help to find out.
Input
The first line contains two integers and (, ) — the length of the array and the maximum allowable difference between consecutive elements.
The second line contains integers () — the elements of the array.
Output
Output a single line with two integers separated by a space:
, if it is impossible to make the array wonderful.
, if the array is already wonderful.
, if the array is not wonderful, and you can make it wonderful by swapping the elements at positions and (). If there are multiple valid pairs of indices, you can output any one of them.
Note that in the pair of indices, the first number must be less than the second.
Examples
Note
In the second example, it would be incorrect to output two non-zero numbers because the array is already wonderful.
In the third example, it is clear that making the array wonderful is impossible.