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:  a_1 ≤ a_2 ≤ ... ≤ a_{n};  a_1 ≥ a_2 ≥ ... ≥ a_{n}. 

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 ≤ 10^5). The second line contains n non-negative space-separated integers a_1, a_2, ..., a_{n} — the elements of the array that Petya's mother presented him. All integers in the input do not exceed 10^9.


-----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.

Difficulty: interview

Starter code:

Solutions:
import sys

def solve():
    n, = rv()
    a, = rl(1)
    for i in range(min(10, n - 1)):
        for j in range(max(i + 1, n - 10), n):
            if a[i] != a[j]:
                a[i], a[j] = a[j], a[i]
                if notsorted(a):
                    print(i + 1, j + 1)
                    return
                a[i], a[j] = a[j], a[i]
    count = 0
    for i in range(n - 1):
        if a[i] != a[i + 1]:
            a[i], a[i + 1] = a[i + 1], a[i]
            if notsorted(a):
                print(i + 1, i + 2)
                return
            a[i], a[i + 1] = a[i + 1], a[i]
            count += 1
        if count == 100: break
    print(-1)

def notsorted(a):
    first, second = True, True
    for i in range(len(a) - 1):
        if a[i] > a[i + 1]:
            first = False
            break
    for i in range(len(a) - 1):
        if a[i] < a[i + 1]:
            second = False
            break
    return True if not first and not second else False



def prt(l): return print(''.join(l))
def rv(): return map(int, input().split())
def rl(n): return [list(map(int, input().split())) for _ in range(n)]
if sys.hexversion == 50594544 : sys.stdin = open("test.txt")
solve()

import sys

def solve():
    n, = rv()
    a, = rl(1)
    for i in range(min(10, n - 1)):
        for j in range(max(i + 1, n - 10), n):
            if a[i] != a[j]:
                a[i], a[j] = a[j], a[i]
                if notsorted(a):
                    print(i + 1, j + 1)
                    return
                a[i], a[j] = a[j], a[i]
    count = 0
    for i in range(n - 1):
        if a[i] != a[i + 1]:
            a[i], a[i + 1] = a[i + 1], a[i]
            if notsorted(a):
                print(i + 1, i + 2)
                return
            a[i], a[i + 1] = a[i + 1], a[i]
            count += 1
        if count == 100: break
    print(-1)

def notsorted(a):
    first, second = True, True
    for i in range(len(a) - 1):
        if a[i] > a[i + 1]:
            first = False
            break
    for i in range(len(a) - 1):
        if a[i] < a[i + 1]:
            second = False
            break
    return True if not first and not second else False



def prt(l): return print(''.join(l))
def rv(): return map(int, input().split())
def rl(n): return [list(map(int, input().split())) for _ in range(n)]
if sys.hexversion == 50594544 : sys.stdin = open("test.txt")
solve()

import sys

def solve():
    n, = rv()
    a, = rl(1)
    for i in range(min(10, n - 1)):
        for j in range(max(i + 1, n - 10), n):
            if a[i] != a[j]:
                a[i], a[j] = a[j], a[i]
                if notsorted(a):
                    print(i + 1, j + 1)
                    return
                a[i], a[j] = a[j], a[i]
    for i in range(n - 1):
        if a[i] != a[i + 1]:
            a[i], a[i + 1] = a[i + 1], a[i]
            if notsorted(a):
                print(i + 1, i + 2)
                return
            a[i], a[i + 1] = a[i + 1], a[i]
    print(-1)

def notsorted(a):
    first, second = True, True
    for i in range(len(a) - 1):
        if a[i] > a[i + 1]:
            first = False
            break
    for i in range(len(a) - 1):
        if a[i] < a[i + 1]:
            second = False
            break
    return True if not first and not second else False



def prt(l): return print(''.join(l))
def rv(): return map(int, input().split())
def rl(n): return [list(map(int, input().split())) for _ in range(n)]
if sys.hexversion == 50594544 : sys.stdin = open("test.txt")
solve()

import sys 
n = int(input())
a = [int(s) for s in input().split()]
for i in range(0,2):
    for j in range(i+1,n):
        if a[i] != a[j]:
            r = a[j]
            a[j] = a[i]
            a[i] = r
            lol = True
            lol1 = True
            for h in range(1,n):
                if a[h-1] > a[h]:
                    lol = False
                if a[h-1] < a[h]:
                    lol1 = False
            if not(lol) and not(lol1):
                print(i+1,j+1)
                return
            else:
                r = a[j]
                a[j] = a[i]
                a[i] = r
print(-1)


def solve(arr):
    if len(arr) <= 2 or len(set(arr)) == 1:
        return [-1]
    else:
        for i in range(len(arr)):
            for j in range(i+1, len(arr)):
                if arr[i] != arr[j]:
                    arr[i], arr[j] = arr[j], arr[i]
                    if arr != sorted(arr) and arr != list(reversed(sorted(arr))):
                        return [i+1, j+1]
                    else:
                        arr[i], arr[j] = arr[j], arr[i]
    return [-1]


def __starting_point():
    n = int(input())
    arr = list(map(int, input().split()))
    print(*solve(arr))
__starting_point()