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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;

template<typename A, typename B>
string to_string(pair<A, B> p);

template<typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template<typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string &s) {
	return '"' + s + '"';
}

string to_string(const char *s) {
	return to_string((string) s);
}

string to_string(bool b) {
	return (b ? "true" : "false");
}

string to_string(vector<bool> v) {
	bool first = true;
	string res = "{";
	for (int i = 0; i < static_cast<int>(v.size()); i++) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(v[i]);
	}
	res += "}";
	return res;
}

template<size_t N>
string to_string(bitset<N> v) {
	string res = "";
	for (size_t i = 0; i < N; i++) {
		res += static_cast<char>('0' + v[i]);
	}
	return res;
}

template<typename A>
string to_string(A v) {
	bool first = true;
	string res = "{";
	for (const auto &x : v) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(x);
	}
	res += "}";
	return res;
}

template<typename A, typename B>
string to_string(pair<A, B> p) {
	return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template<typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", "
			+ to_string(get<2>(p)) + ")";
}

template<typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", "
			+ to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void dbg_out() {
	cout << endl;
}

template<typename Head, typename ... Tail>
void dbg_out(Head H, Tail ... T) {
	cout << " " << to_string(H);
	dbg_out(T...);
}

#ifndef ONLINE_JUDGE
#define dbg(...) cout << "[" << #__VA_ARGS__ << "]:", dbg_out(__VA_ARGS__)
#else
#define dbg(...) ;
#endif

#define import ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define read(x) cin >> x
#define out(x) cout << x
#define readInt(x) scanf("%d",&x)
#define readLong(x) scanf("%lld",&x)
#define readDouble(x) scanf("%Lf",&x)
#define readString(x) scanf("%s",&x)
#define outInt(x) printf("%d",x)
#define outLong(x) printf("%lld",x)
#define outDouble(x) printf("%Lf",x)
#define outString(x) printf("%s",x)
#define outLine(x) cout << x << endl
#define readArr(x,size) for(int i=0;i<size;i++)read(x[i])
#define outArr(x,size) for(int i=0;i<size;i++){cout << x[i] << " ";}out(endl)
#define ll long long
#define ld long double
#define pii pair<int,int>
#define len(s) (int)(s.length())
#define bitCnt(msk) __builtin_popcount(msk)
#define ff first
#define ss second
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int mrand(int a) {
	return rng() % a;
}


void test_case() {
	int n;
	cin >> n;
	vector<pair<int,int>>deg(n);
	for(int i=0;i<n;i++){
		int x;
		cin >> x;
		deg[i]=make_pair(x,i);
	}
	sort(deg.begin(),deg.end());
	vector<pair<int,pair<int,int>>>arr(n*(n-1)/2);
	int idx=0;
	for(int c=n-1;c>=0;c--) {
		int i=deg[c].second;
		for(int o=0;o<c;o++) {
			int j=deg[o].second;
			pair<int,pair<int,int>>zz;
			zz.first=-deg[c].first+deg[o].first;
			zz.second=make_pair(i, j);
			arr[idx++]=zz;
		}
	}
	sort(arr.begin(),arr.end());
	for(int c=0;c<arr.size();c++) {
		int i=arr[c].second.first,j=arr[c].second.second;
		cout << "? " << i+1 << " " << j+1 << endl;
		string s;
		cin >> s;
		if(s[0]=='Y') {
			cout << "! " << i+1 << " " << j+1 << endl;
			return;
		}

	}

	cout << "! 0 0" << endl;
}

int main() {
	import;
//	int tc = 1;
//	readInt(tc);
//	while (tc--)
		test_case();
	return 0;
}