252_B. Unsorting Array
Little Petya likes arrays of integers a lot. Recently his mother has presented him one such array consisting of n elements. Petya is now wondering whether he can swap any two distinct integers in the array so that the array got unsorted. Please note that Petya can not swap equal integers even if they are in distinct positions in the array. Also note that Petya must swap some two integers even if the original array meets all requirements.

Array a (the array elements are indexed from 1) consisting of n elements is called sorted if it meets at least one of the following two conditions:

  1. a1 ≤ a2 ≤ ... ≤ an; 
  2. a1 ≥ a2 ≥ ... ≥ an. 



Help Petya find the two required positions to swap or else say that they do not exist.

Input

The first line contains a single integer n (1 ≤ n ≤ 105). The second line contains n non-negative space-separated integers a1, a2, ..., an — the elements of the array that Petya's mother presented him. All integers in the input do not exceed 109.

Output

If there is a pair of positions that make the array unsorted if swapped, then print the numbers of these positions separated by a space. If there are several pairs of positions, print any of them. If such pair does not exist, print -1. The positions in the array are numbered with integers from 1 to n.

Examples

Input

1
1


Output

-1


Input

2
1 2


Output

-1


Input

4
1 2 3 4


Output

1 2


Input

3
1 1 1


Output

-1

Note

In the first two samples the required pairs obviously don't exist.

In the third sample you can swap the first two elements. After that the array will look like this: 2 1 3 4. This array is unsorted.
```python
n=int(input())
a=[int(i) for i in input().split()]
b=len(set(a))
c=sorted(a,reverse=True)
if n==1 or n==2 or b==1:
    print("-1")
elif n==3:
    if b==2:
        if a[0]==a[2]:
            print("-1")
        elif a[0]==a[1]:
            print("2 3")
        else:
            print("1 2")
    elif a[1]!=max(a[0],a[1],a[2]):
        print(a.index(c[0])+1,"2")
    else:
            print(a.index(c[2])+1,"2")
elif n==4:
    if b==2:
        if a[0]==a[3]:
            if a[0]==a[1] or a[0]==a[2]:
                print("2 3")
            else:
                print("1 2")
        elif a[0]==a[1]:
            if a[0]==a[2]:
                print("4 3")
            else:
                print("2 3")
        elif a[0]==a[2]:
            print("1 2")
        elif a[1]==a[2]:
            print("1 2")
        elif a[1]==a[3]:
            print("1 2")
        else:
            print("2 3")
    elif b==3:
        if c[0]==c[1]:
            if a.index(c[3])!=2:
                print(a.index(c[3])+1,"3")
            elif a.index(c[3])!=1:
                print(a.index(c[3])+1,"2")
        else:
            if a.index(c[0])!=2:
                print(a.index(c[0])+1,"3")
            elif a.index(c[0])!=1:
                print(a.index(c[0])+1,"2")
    elif b==4:
        if a.index(c[0])!=2:
            print(a.index(c[0])+1,"3")
        elif a.index(c[0])!=1:
            print(a.index(c[0])+1,"2")
elif n>4:
    i=0
    while(a[i]==a[0]):
        i+=1
    if i>3:
        print(i+1,"2")
    else:
        d=list(a)
        for i in range (n-4):
            a.pop()
        c=sorted(a,reverse=True)
        b=len(set(c))
        if b==2:
            if a[0]==a[3]:
                if a[0]==a[1] or a[0]==a[2]:
                    print("2 3")
                else:
                    print("1 2")
            elif a[0]==a[1]:
                if a[0]==a[2]:
                    print("4 3")
                else:
                    print("2 3")
            elif a[0]==a[2]:
                print("1 2")
            elif a[1]==a[2]:
                print("1 2")
            elif a[1]==a[3]:
                print("1 2")
            else:
                print("2 3")
        elif b==3:
            if c[0]==c[1]:
                if a.index(c[3])!=2:
                    print(a.index(c[3])+1,"3")
                elif a.index(c[3])!=1:
                    print(a.index(c[3])+1,"2")
            else:
                if a.index(c[0])!=2:
                    print(a.index(c[0])+1,"3")
                elif a.index(c[0])!=1:
                    print(a.index(c[0])+1,"2")
        elif b==4:
            if a.index(c[0])!=2:
                print(a.index(c[0])+1,"3")
            elif a.index(c[0])!=1:
                print(a.index(c[0])+1,"2")
```