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.
3
3 2 3
 3
1 3 1
 5
1 1 2 1 1
 5
1 1 1 1 2
 4
562617869 562617869 562617869 562617869
 6
1 2 3 3 2 1
 4
562617869 961148050 961148050 961148050
 4
961148050 951133776 596819899 0
 4
961148050 961148050 562617869 961148050
 3
1 2 2
 4
562617869 562617869 961148050 562617869
 3
2 1 3
 4
596819899 562617869 951133776 961148050
 4
951133776 961148050 596819899 562617869
 7
6 5 4 3 2 1 0
 10
1 2 1 2 1 2 1 2 1 2
 4
562617869 596819899 951133776 961148050
 4
961148050 961148050 961148050 562617869
 4
961148050 562617869 562617869 562617869
 4
562617869 562617869 562617869 961148050
 4
2 1 3 4
 4
961148050 951133776 596819899 562617869
 4
562617869 961148050 562617869 562617869
 4
961148050 562617869 961148050 961148050
 3
1 3 2
 4
562617869 961148050 596819899 951133776
 3
2 1 2
 11
1 1 1 1 1 2 2 2 2 2 1
 4
562617869 596819899 951133776 0
 3
1 2 1

-1
 -1
 2 3
 4 5
 -1
 1 2
 1 2
 1 2
 2 3
 1 2
 2 3
 2 3
 2 3
 2 3
 1 2
 1 2
 1 2
 3 4
 1 2
 3 4
 2 3
 1 2
 2 3
 2 3
 1 2
 1 2
 -1
 5 6
 1 2
 -1

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import java.util.Set;

/**
 * @author Ivan Pryvalov (ivan.pryvalov@gmail.com)
 */
public class Codeforces_Round_153_Div2_B implements Runnable{

	private void solve() throws IOException {
		int n = scanner.nextInt(); //10^5
		int[] a = scanner.loadIntArray(n);

		
		int[] b = a.clone();
		Arrays.sort(b);
		
		solveCompare(a,b);
		

		if (n<10){
			int[] res = solveManually(a);
			if (res==null)
				out.println("-1");
			else
				out.println(res[0]+" "+res[1]);
			return;
		}
		
		// n>MAX
		Map<Integer, List<Integer>> map = new HashMap<Integer, List<Integer>>();
		for(int pos=0; pos<n; pos++){
			int x = a[pos];
			List<Integer> cnt = map.get(x);
			if (cnt==null){
				cnt = new ArrayList<Integer>();
				map.put(x, cnt);
			}
			cnt.add(pos);
		}
		
		if (map.size()==1){
			out.println("-1");
		}else{// map.size()>=2
			if (!isSorted(a)){
				boolean solved = false;
				List<Integer> idx = new ArrayList<Integer>();
				for(Entry<Integer,List<Integer>> e: map.entrySet()){
					List<Integer> lst = e.getValue();
					idx.add(lst.get(lst.size()/2));
				}
				Random random = new Random();
				for(;;){
					if (solved)
						break;
					for(;;){
						int indi = random.nextInt(idx.size());
						int indj = random.nextInt(idx.size());
						int i = idx.get(indi);
						int j = idx.get(indj);
						swap(a,i,j);
						if (!isSorted(a)){
							solved = true;
							out.println((i+1)+" "+(j+1));
							break;
						}
						swap(a,i,j);
					}
				}
			}else{ //sorted
				boolean solved = false;
				int[] ii = {0,n-1};
				for(int i:ii){
					if (solved)
						break;
					for(int j=0; j<n; j++){
						if (i!=j){
							swap(a,i,j);
							if (!isSorted(a)){
								out.println((i+1)+" "+(j+1));
								solved = true;
								break;
							}
							swap(a,i,j);
						}
					}
				}
				if (!solved){
					throw new RuntimeException();
				}
			}			
		}
	}

	private void solveCompare(int[] a, int[] b) {
		int n = a.length;
		
		int[] isDiff = new int[n];
		List<Integer> diffList = new ArrayList<Integer>();
		for(int i=0; i<n; i++){
			if (a[i]!=b[i]){
				diffList.add(i);
				isDiff[i] = 1;
			}
		}
		
		
		
		
	}

	private int[] solveManually(int[] a) {
		for (int i = 0; i < a.length; i++) {
			for (int j = i+1; j < a.length; j++) {
				if (a[i]==a[j])
					continue;
				swap(a,i,j);
				boolean sorted = isSorted(a);
				if (!sorted){
					return new int[]{i+1,j+1};
				}
				swap(a,i,j);
			}
		}
		return null;
	}

	private boolean isSorted(int[] a){
		return isSortedUp(a) || isSortedDown(a);
	}
	
	private boolean isSortedUp(int[] a) {
		boolean res = true;
		for(int i=0; i<a.length-1; i++){
			if (!(a[i]<=a[i+1])){
				res = false;
			}
		}
		return res;
	}
	
	private boolean isSortedDown(int[] a) {
		boolean res = true;
		for(int i=0; i<a.length-1; i++){
			if (!(a[i]>=a[i+1])){
				res = false;
			}
		}
		return res;
	}

	private void swap(int[] a, int i, int j) {
		int tmp = a[i];
		a[i] = a[j];
		a[j] = tmp;
	}

	/////////////////////////////////////////////////
	final int BUF_SIZE = 1024 * 1024 * 8;//important to read long-string tokens properly
	final int INPUT_BUFFER_SIZE = 1024 * 1024 * 8 ;
	final int BUF_SIZE_INPUT = 1024;
	
	final int BUF_SIZE_OUT = 1024;
	
	boolean inputFromFile = false;
	String filenamePrefix = "A-small-attempt0";
	String inSuffix = ".in";
	String outSuffix = ".out";
	
	//InputStream bis;
	//OutputStream bos;
	PrintStream out;
	ByteScanner scanner;
	ByteWriter writer;
	
//	@Override
	public void run() {
		try{
			InputStream bis = null;
			OutputStream bos = null;
			//PrintStream out = null;
			if (inputFromFile){
				File baseFile = new File(getClass().getResource("/").getFile());
				bis = new BufferedInputStream(
						new FileInputStream(new File(
								baseFile, filenamePrefix+inSuffix)),
								INPUT_BUFFER_SIZE);
				bos = new BufferedOutputStream(
						new FileOutputStream(
								new File(baseFile, filenamePrefix+outSuffix)));
				out = new PrintStream(bos);
			}else{
				bis = new BufferedInputStream(System.in, INPUT_BUFFER_SIZE);
				bos = new BufferedOutputStream(System.out);
				out = new PrintStream(bos);
			}
			scanner = new ByteScanner(bis, BUF_SIZE_INPUT, BUF_SIZE);
			writer = new ByteWriter(bos, BUF_SIZE_OUT);
			
			solve();
			out.flush();
		}catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}
	
	public interface Constants{
		final static byte ZERO = '0';//48 or 0x30
		final static byte NINE = '9';
		final static byte SPACEBAR = ' '; //32 or 0x20
		final static byte MINUS = '-'; //45 or 0x2d	
		
		final static char FLOAT_POINT = '.';
	}
	
	public static class EofException extends IOException{
	}
	
	public static class ByteWriter implements Constants {
		
		int bufSize = 1024;
		byte[] byteBuf = new byte[bufSize];
		OutputStream os;
		
		public ByteWriter(OutputStream os, int bufSize){
			this.os = os;
			this.bufSize = bufSize;
		}
		
		public void writeInt(int num) throws IOException{
	         int byteWriteOffset = byteBuf.length;
	         if (num==0){
	        	 byteBuf[--byteWriteOffset] = ZERO;
	         }else{
	        	 int numAbs = Math.abs(num);
	        	 while (numAbs>0){
	        		 byteBuf[--byteWriteOffset] = (byte)((numAbs % 10) + ZERO);
	        		 numAbs /= 10;
	        	 }
	        	 if (num<0)
	        		 byteBuf[--byteWriteOffset] = MINUS;
	         }
	         os.write(byteBuf, byteWriteOffset, byteBuf.length - byteWriteOffset);
		}
		
		/**
		 * Please ensure ar.length <= byteBuf.length!
		 * 
		 * @param ar
		 * @throws IOException
		 */
		public void writeByteAr(byte[] ar) throws IOException{
			for (int i = 0; i < ar.length; i++) {
				byteBuf[i] = ar[i];
			}
			os.write(byteBuf,0,ar.length);
		}
		
		public void writeSpaceBar() throws IOException{
			byteBuf[0] = SPACEBAR;
			os.write(byteBuf,0,1);
		}
		
	}
	
	public static class ByteScanner implements Constants{
		
		InputStream is;
		
		public ByteScanner(InputStream is, int bufSizeInput, int bufSize){
			this.is = is;
			this.bufSizeInput = bufSizeInput;
			this.bufSize = bufSize;
			
			byteBufInput = new byte[this.bufSizeInput];
			byteBuf = new byte[this.bufSize];
		}
		
		public ByteScanner(byte[] data){
			byteBufInput = data;
			bufSizeInput = data.length;
			bufSize = data.length;
			byteBuf = new byte[bufSize];
			byteRead = data.length;
			bytePos = 0;
		}
		
		private int bufSizeInput;
		private int bufSize;
		
		byte[] byteBufInput;
		byte by=-1;
		int byteRead=-1;
		int bytePos=-1;

		byte[] byteBuf;
		int totalBytes;
		
		boolean eofMet = false;
		
		private byte nextByte() throws IOException{
			
			if (bytePos<0 || bytePos>=byteRead){
				byteRead = is==null? -1: is.read(byteBufInput);
				bytePos=0;
				if (byteRead<0){
					byteBufInput[bytePos]=-1;//!!!
					if (eofMet)
						throw new EofException();
					eofMet = true;
				}
			}
			return byteBufInput[bytePos++];
		}
		
		/**
		 * Returns next meaningful character as a byte.<br>
		 * 
		 * @return
		 * @throws IOException
		 */
		public byte nextChar() throws IOException{
			while ((by=nextByte())<=0x20);
			return by;
		}
		
		/**
		 * Returns next meaningful character OR space as a byte.<br>
		 * 
		 * @return
		 * @throws IOException
		 */
		public byte nextCharOrSpacebar() throws IOException{
			while ((by=nextByte())<0x20);
			return by;
		}
		
	    /**
	     * Reads line.
	     * 
	     * @return
	     * @throws IOException
	     */
	    public String nextLine() throws IOException {
            readToken((byte)0x20);
            return new String(byteBuf,0,totalBytes);
	    }
	    
	    public byte[] nextLineAsArray() throws IOException {
            readToken((byte)0x20);
            byte[] out = new byte[totalBytes];
            System.arraycopy(byteBuf, 0, out, 0, totalBytes);
            return out;
	    }
	    
		
	    /**
	     * Reads token. Spacebar is separator char.
	     * 
	     * @return
	     * @throws IOException
	     */
	    public String nextToken() throws IOException {
            readToken((byte)0x21);
            return new String(byteBuf,0,totalBytes);
	    }
	    
	    /**
	     * Spacebar is included as separator char
	     * 
	     * @throws IOException
	     */
	    private void readToken() throws IOException {	    	
            readToken((byte)0x21);
	    }
	    
	    private void readToken(byte acceptFrom) throws IOException {
            totalBytes = 0;
            while ((by=nextByte())<acceptFrom);
            byteBuf[totalBytes++] = by;
            while ((by=nextByte())>=acceptFrom){
                byteBuf[totalBytes++] = by;
            }
	    }
		
	    public int nextInt() throws IOException{
			readToken();
			int num=0, i=0;
			boolean sign=false;
			if (byteBuf[i]==MINUS){
				sign = true;
				i++;
			}
			for (; i<totalBytes; i++){
				num*=10;
				num+=byteBuf[i]-ZERO;
			}
			return sign?-num:num;
		}
		
		public long nextLong() throws IOException{
			readToken();
			long num=0;
			int i=0;
			boolean sign=false;
			if (byteBuf[i]==MINUS){
				sign = true;
				i++;
			}
			for (; i<totalBytes; i++){
				num*=10;
				num+=byteBuf[i]-ZERO;
			}
			return sign?-num:num;
		}
		
		/*
		//TODO test Unix/Windows formats
		public void toNextLine() throws IOException{
			while ((ch=nextChar())!='\n');
		}
		*/
		
		public double nextDouble() throws IOException{
			readToken();
			char[] token = new char[totalBytes];
			for (int i = 0; i < totalBytes; i++) {
				token[i] = (char)byteBuf[i];
			}
			return Double.parseDouble(new String(token));
		}
		
		public int[] loadIntArray(int size) throws IOException{
			int[] a = new int[size];
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
			return a;
		}
	    
	}
	
	public static abstract class Timing{
		private static int counter = 0;
		protected String name = "Timing"+(++counter);
		private boolean debug;
		
		public Timing(boolean debug) {
			super();
			this.debug = debug;
		}
		
		public abstract void run();
		public void start(){
			long time1 = System.currentTimeMillis();
			run();
			long time2 = System.currentTimeMillis();
			if (debug)
				System.out.println(name+" time = "+(time2-time1)/1000.0+" ms.");
		}
		
	}
	
	public static void main(String[] args) {
		new Codeforces_Round_153_Div2_B().run();
	}
	
}
