There are vineyards arranged in a row, numbered from to . Giorgio starts the tour from vineyard , once the first tasting is over he will move on to the vineyard , then to the vineyard and so on until he reaches the vineyard . Note that Giorgio can start and end his tour on the same vineyard.
To visit the vineyard Giorgio has to pay euro. The cost of a tour is the cost of each vineyard visited.
There are a total of different tours, Giorgio will choose one of the tours in the following way:
First, he sorts the tours in ascending order of cost, in case of a tie, the tours with the smallest starting vineyard come first. Then, he chose the -th tour from this order.
Help Giorgio find the first and the last vineyards of the -th tour!
Input data
The first line of the input contains the integers and . The second line contains integers .
Output data
The output contains a single line which has the integers and : the first and the last vineyards of Giorgio's tour.
Constraints and clarifications
- For tests worth points, = for all values in the input.
- For tests worth more points, .
Example 1
stdin
4 4
1 2 3 1
stdout
0 1
Explanation
In the first sample case there are possible tours, in order:
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
from to : the cost is
The fourth tour starts from vineyard and end in vineyard .
Example 2
stdin
6 18
1 2 1 2 1 2
stdout
2 5