A. Data Restoration
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The employees of the laboratory are restoring an archive of experiment results. They know that the records in a correct archive must be arranged in nondecreasing order of values. However, due to a program error, one continuous fragment of the archive may have been saved in reverse order.

The archive is represented by an array $$$a$$$ of length $$$n$$$. In one operation, you can choose two indices $$$l$$$ and $$$r$$$ $$$(1 \le l \lt r \le n)$$$ and reverse the order of the elements of the subarray $$$a_l, a_{l+1}, \ldots, a_r$$$.

Determine whether it is possible to obtain a nondecreasing array by performing at most one operation. If it is possible and the array is not sorted yet, output the boundaries of a suitable subarray. If the array is already sorted, report it separately. If it is impossible to obtain a nondecreasing array, report that as well.

Input

The first line of the input contains an integer $$$n$$$ $$$(1 \le n \le 2 \cdot 10^5)$$$ — the length of the array $$$a$$$.

The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(1 \le a_i \le 10^9)$$$ — the values of the elements of the array $$$a$$$.

Output

If the array $$$a$$$ is already nondecreasing, print the number $$$0$$$.

If it is impossible to obtain a nondecreasing array by performing at most one operation, print the number $$$-1$$$.

Otherwise, print the boundaries $$$l, r$$$ $$$(1 \le l \lt r \le n)$$$ of the subarray on which the operation described in the statement should be performed.

Examples
Input
1
1
Output
0
Input
5
7 9 10 9 20
Output
3 4
Input
6
8 9 1 3 5 7
Output
-1