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.

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {


    private static boolean isSorted(int [] A){
        for (int i = 1;i < A.length;i++)
            if(A[i - 1] > A[i])
                return false;
        return true;
    }
    private static boolean isSorted2(int [] A){
        if (isSorted(A)) return true;
        int [] B = new int[A.length];
        int j = A.length - 1;
        for (int i = 0;i < A.length;i++)
            B[j--] = A[i];
        return isSorted(B);

    }
    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n];
        for (int i = 0;i < n;i++) A[i] = io.getNextInt();
        boolean same = true;
        for (int i = 1;i < n && same;i++) same = A[i] == A[0];
        if (same || n == 2) io.println(-1);
        else {
            boolean done = false;
            int j = 0;
            for (int i = 0;i < n && !done;i++){
                if(i == j) continue;
                if(A[i] != A[j]){
                    int x,y;
                    x = A[i]; y = A[j];
                    A[i] = y; A[j] = x;

                    if(!isSorted2(A)){
                        io.println((j + 1) + " " + (i + 1));
                        done = true;
                    }
                    x = A[i]; y = A[j];
                    A[i] = y; A[j] = x;
                }
            }
            j = 1;

            for (int i = 0;i < n && !done;i++){
                if(i == j) continue;
                if(A[i] != A[j]){
                    int x,y;
                    x = A[i]; y = A[j];
                    A[i] = y; A[j] = x;

                    if(!isSorted2(A)){
                        io.println((j + 1) + " " + (i + 1));
                        done = true;
                    }
                    x = A[i]; y = A[j];
                    A[i] = y; A[j] = x;
                }
            }
            if(!done) io.println(-1);
        }
        io.close();
    }
}


class item implements Comparable<item>{
    int price,time;
    public item(int time,int price){
        this.price = price;
        this.time = time;
    }
    @Override
    public int compareTo(item o){
        return this.price - o.price;
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

