Problem: This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python or flush(output) in Pascal to flush the output. If you use some other programming language, consult its documentation. You may also refer to the guide on interactive problems: <https://codeforces.com/blog/entry/45307>.

There is a city in which Dixit lives. In the city, there are n houses. There is  exactly one directed road between every pair of houses. For example, consider two houses A and B, then there is a directed road either from A to B or from B to A but not both. The number of roads leading to the i-th house is k_i.

Two houses A and B are bi-reachable if A is reachable from B and B is reachable from A. We say that house B is reachable from house A when there is a path from house A to house B.

Dixit wants to buy two houses in the city, that is, one for living and one for studying. Of course, he would like to travel from one house to another. So, he wants to find a pair of bi-reachable houses A and B. Among all such pairs, he wants to choose one with the maximum value of |k_A - k_B|, where k_i is the number of roads leading to the house i. If more than one optimal pair exists, any of them is suitable.

Since Dixit is busy preparing CodeCraft, can you help him find the desired pair of houses, or tell him that no such houses exist?

In the problem input, you are not given the direction of each road. You are given — for each house — only the number of incoming roads to that house (k_i).

You are allowed to ask only one type of query from the judge: give two houses A and B, and the judge answers whether B is reachable from A. There is no upper limit on the number of queries. But, you cannot ask more queries after the judge answers "Yes" to any of your queries. Also, you cannot ask the same query twice.

Once you have exhausted all your queries (or the judge responds "Yes" to any of your queries), your program must output its guess for the two houses and quit.

See the Interaction section below for more details.

Input

The first line contains a single integer n (3 ≤ n ≤ 500) denoting the number of houses in the city. The next line contains n space-separated integers k_1, k_2, ..., k_n (0 ≤ k_i ≤ n - 1), the i-th of them represents the number of incoming roads to the i-th house.

Interaction

To ask a query, print "? A B" (1 ≤ A,B ≤ N, A≠ B). The judge will respond "Yes" if house B is reachable from house A, or "No" otherwise.

To output the final answer, print "! A B", where A and B are bi-reachable with the maximum possible value of |k_A - k_B|. If there does not exist such pair of houses A and B, output "! 0 0".

After outputting the final answer, your program must terminate immediately, otherwise you will receive Wrong Answer verdict.

You cannot ask the same query twice. There is no upper limit to the number of queries you ask, but, you cannot ask more queries after the judge answers "Yes" to any of your queries. Your program must now output the final answer ("! A B" or "! 0 0") and terminate.

If you ask a query in incorrect format or repeat a previous query, you will get Wrong Answer verdict.

After printing a query do not forget to output the end of the line and flush the output. Otherwise, you will get the Idleness limit exceeded error. To do this, use:

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see documentation for other languages.

Examples

Input


3
1 1 1
Yes

Output


? 1 2
! 1 2

Input


4
1 2 0 3
No
No
No
No
No
No

Output


? 2 1
? 1 3
? 4 1
? 2 3
? 4 2
? 4 3
! 0 0

Note

In the first sample input, we are given a city of three houses with one incoming road each. The user program asks one query: "? 1 2": asking whether we can reach from house 1 to house 2. The judge responds with "Yes". The user program now concludes that this is sufficient information to determine the correct answer. So, it outputs "! 1 2" and quits.

In the second sample input, the user program queries for six different pairs of houses, and finally answers "! 0 0" as it is convinced that no two houses as desired in the question exist in this city.

Solution (in JAVA):

Solution:

import java.awt.List;
import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;


public class N711 {
	static PrintWriter out;
	static Scanner sc;
	static ArrayList<Integer>q,w;
	static ArrayList<Integer>adj[];
	static HashSet<Integer>primesH;
	static boolean prime[];
	//static ArrayList<Integer>a;
	static HashSet<Long>tmp;
	static boolean[]v;
	static int[]a,b,c,d;
	static long l[],dp[][][];
	static char[][]mp;
	static int A,B,n,m,h;
	static long oo=((long)1e9)+7;
	public static void main(String[]args) throws IOException {
		sc=new Scanner(System.in);
		out=new PrintWriter(System.out);
		//A();
		//B();
	   // C();
	//	CC();
		//D();
		E();
		//minimum for subarrays of fixed length
		//F();
		out.close();
	}
	static long gcd (long a, long b) {
	    return b==0?a:gcd (b, a % b);
	}
	  private static void A() throws IOException {
		  int t=ni();
			while(t-->0) {
				long n=nl();
				
			
				for(;;n++) {
					String s=n+"";
					int sum=0;
					for(int i=0;i<s.length();i++) {
						sum+=s.charAt(i)-'0';
					}
					long g=gcd(n,sum);
					if(g>1)break;
				}
				out.println(n);
			}
		
	   }
		static void B() throws IOException {
			int t=ni();
			while(t-->0) {
				int n=ni(),w=ni();
				a=nai(n);
				int h=0;
				int lrg=1;
				TreeMap<Integer, Integer>tr=new TreeMap<Integer, Integer>();
				for(int i=0;i<n;i++) {
					lrg=Math.max(lrg, a[i]);
					tr.put(a[i], tr.getOrDefault(a[i], 0)+1);
				}
				int tk=0;
				for(;tk<n&&lrg>0;h++) {
					int ww=w;
					int lrgg=lrg;
					while(tk<n&&lrgg>=1) {
						int ft=ww/lrgg;
						if(ww==0)break;
						int val=tr.getOrDefault(lrgg, 0);
						int tt=Math.min(ft,val );
						if(tt>0)
							tr.put(lrgg, val-tt);
						ww=ww-lrgg*tt;
						lrgg/=2;
						tk+=tt;
					}
					while(lrg>0&&tr.getOrDefault(lrg, 0)==0) {
						lrg/=2;
					}
					
				}
				out.println(h);
			}
		}
		
		static void C() throws IOException{
			int t=ni();
			while(t-->0) {
				int n=ni(),k=ni();
				long ans;
				long vs[]=new long[n-1];
			//	Arrays.fill(vs, 1);
				if(k==1)out.println(1);
				else if(k==2)out.println(n+1);
				else {
					ans=n+1;
					for(int i=0;i<vs.length;i++) {
						vs[i]=i+1;
						//ans=(ans+vs[i]%oo)%oo;
					}
					long pr=n*(n-1)/2;

					ans=(ans+pr)%oo;
					for(int i=0;i<k-3&&n>1;i++) {
						if(i%2==1) {
							long tmp=vs[n-2];
							vs[n-2]=pr;
							long sum=pr;
							ans=(ans+pr)%oo;
							for(int j=n-3;j>=0;j--) {
								//long tmp=vs[j+1];
								pr-=tmp;
								if(pr<0)pr+=oo;
								tmp=vs[j];
								vs[j]=pr;
								sum=(sum+vs[j])%oo;
								ans=(ans+vs[j])%oo;
								
							}
							pr=sum;
							
						}else {
							long tmp=vs[0];
							vs[0]=pr;
							long sum=pr;
							ans=(ans+pr)%oo;
							for(int j=1;j<n-1;j++) {
								pr-=tmp;
								if(pr<0) {
									pr=(pr+oo);
								}
								tmp=vs[j];
								vs[j]=pr;
								sum=(sum+vs[j])%oo;
								ans=(ans+vs[j])%oo;
							}
							pr=sum;
						}
					}
					//ans=(ans+pr)%oo;
					out.println(ans);
					//out.println(oo);
				}
			}
		}
		

		static void CC() throws IOException {
			int t=ni();
			while(t-->0) {
				n=ni();
				int k=ni();
				dp=new long[n][k+1][2];
				for(long[][]d1:dp) 
					for(long[]d2:d1)Arrays.fill(d2, -1);
				out.println(dp(0,k,0));
			}
			
		}

	private static long dp(int i, int k, int d) {
			if(k==1)return 1;
			if(i<0||i==n)return 0;
			if(dp[i][k][d]!=-1)return dp[i][k][d];
			long ans=2;
			if(d==0) {
				if(i<n-1) {
					ans+=dp(i+1,k,d)-1;
				}
				ans%=oo;
				if(i>0) {
					ans+=dp(i-1,k-1,1-d)-1;
				}
				ans%=oo;
			}else {
				if(i<n-1) {
					ans+=dp(i+1,k-1,1-d)-1;
				}
				ans%=oo;
				if(i>0) {
					ans+=dp(i-1,k,d)-1;
				}
				ans%=oo;
			}
			return dp[i][k][d]=ans;
		}
	static void D() throws IOException {
		int n=ni(),m=ni();
		double[][]vs=new double[n][3];
		for(int i=0;i<n;i++) {
			vs[i][0]=ni();
			vs[i][1]=nl()/100000.0;
			vs[i][2]=ni();
		}
		int[]ans=new int[m+1];
		Arrays.fill(ans, -1);
		boolean[]v=new boolean[m+1],vv=new boolean[m+1];
		v[0]=true;
		for(int i=0;i<n;i++) {
			int hh=0;
			for(boolean x:v) {
				vv[hh++]=x;
			}
			int t=(int)vs[i][0];
			int cur=(int)Math.ceil(vs[i][1]);
			int c=(int)vs[i][2];
			if(t==1) {
//				for(int j=cur,cc=c;j<=m&&cc>0;j+=cur,cc--) {
//					if(ans[j]==-1)ans[j]=i+1;
//					//else break;
//				}
				for(int j=0;j<=m;j++) {
					if(!v[j])continue;
					//if(ans[j]==-1)continue;
					for(long k=j*1l,cc=c;k<=m&&cc>=0;k+=cur,cc--) {
						if(v[(int)k])break;
						if(cc<c)
						vv[(int)k]=true;
						ans[(int)k]=i+1;
					}
				}
			}else {
				for(int j=0;j<=m;j++) {
					if(!v[j])continue;
					//if(ans[j]==-1)continue;
					long k=j*1l;
					for(int cc=c;k<=m&&cc>=0;k=(long)Math.ceil(k*1l*vs[i][1]),cc--) {
						if(v[(int)k])break;
						if(cc<c)
						vv[(int)k]=true;
						ans[(int)k]=i+1;
					}
				}
			}
			hh=0;
			for(boolean x:vv) {
				v[hh++]=x;
			}
		}
		for(int i=1;i<=m;i++)out.print(ans[i]+" ");
		out.println();
		
	}
	static void E() throws IOException {
		int n=ni();
		a=nai(n);
		ArrayList<Tri> pq=new ArrayList<Tri>();
		for(int i=0;i<n;i++) {
			for(int j=i+1;j<n;j++) {
				pq.add(new Tri(i+1,j+1,Math.abs(a[i]-a[j])));
			}
		}
		Collections.sort(pq);
		int i=0;
		while(i<pq.size()) {
			Tri p=pq.get(i++);
			int x=a[p.x-1],y=a[p.y-1];
			if(x<y) {
				int tmp=p.x;
				p.x=p.y;
				p.y=tmp;
			}
			out.println("? "+p.x+" "+p.y);
			out.flush();
			String s=ns();
			if(s.charAt(0)=='Y'){
				out.println("! "+p.x+" "+p.y);
				out.flush();
				out.close();return;
			}
		}
		out.println("! "+0+" "+0);
		out.flush();
		out.close();
		
	}
	static class Tri implements Comparable<Tri>{
		int x,y,z;
		public Tri(int x,int y,int z) {
			this.x=x;
			this.y=y;
			this.z=z;
		}
		@Override
		public int compareTo(Tri t) {
			return t.z-z;
		}
		
	}
		private static void paint(char[][] mp, int i) {
		for(int j=0;j<mp.length;j++) {
			mp[j][i]='X';
		}
		if(i>1) {
			for(int a=0;a<mp.length;a++) {
				if(mp[a][i-2]=='X') {
					mp[a][i-1]='X';
					break;
				}
				if(a==mp.length-1) {
					mp[a][i-1]='X';
				}
			}
		}
		if(i<mp[0].length-2) {
			for(int a=0;a<mp.length;a++) {
				if(mp[a][i+2]=='X') {
					mp[a][i+1]='X';
					break;
				}
				if(a==mp.length-1) {
					mp[a][i+1]='X';
				}
			}
		}
		
	}
	static int ni() throws IOException {
		return sc.nextInt();
	}
	static double nd() throws IOException {
		return sc.nextDouble();
	}
	static long nl() throws IOException {
		return  sc.nextLong();
	}
	static String ns() throws IOException {
		return sc.next();
	}
	static int[] nai(int n) throws IOException {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextInt();
		return a;
	}
	static long[] nal(int n) throws IOException {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = sc.nextLong();
		return a;
	}
	static int[][] nmi(int n,int m) throws IOException{
		int[][]a=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextInt();
			}
		}
		return a;
	}

	static long[][] nml(int n,int m) throws IOException{
		long[][]a=new long[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				a[i][j]=sc.nextLong();
			}
		}
		return a;
	}
	static void o(String x) {
		out.print(x);
	}
	static void ol(String x) {
		out.println(x);
	}
	static void ol(int x) {
		out.println(x);
	}
	static void disp1(int []a) {
		for(int i=0;i<a.length;i++) {
			out.print(a[i]+" ");
		}
		out.println();
	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public boolean hasNext() {return st.hasMoreTokens();}
		public int nextInt() throws IOException {return Integer.parseInt(next());}
		
		public double nextDouble() throws IOException {return Double.parseDouble(next());}
		
		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}
			
		public boolean ready() throws IOException {return br.ready(); }
		

	}
}