Problem: As you all know, the plum harvesting season is on! Little Milutin had his plums planted in an orchard that can be represented as an n by m matrix. While he was harvesting, he wrote the heights of all trees in a matrix of dimensions n by m.

At night, when he has spare time, he likes to perform various statistics on his trees. This time, he is curious to find out the height of his lowest tree. So far, he has discovered some interesting properties of his orchard. There is one particular property that he thinks is useful for finding the tree with the smallest heigh.

Formally, let L(i) be the leftmost tree with the smallest height in the i-th row of his orchard. He knows that L(i) ≤ L(i+1) for all 1 ≤ i ≤ n - 1. Moreover, if he takes a submatrix induced by any subset of rows and any subset of columns, L(i) ≤ L(i+1) will hold for all 1 ≤ i ≤ n'-1, where n' is the number of rows in that submatrix.

Since the season is at its peak and he is short on time, he asks you to help him find the plum tree with minimal height.

Input

This problem is interactive.

The first line of input will contain two integers n and m, representing the number of rows and the number of columns in Milutin's orchard. It is guaranteed that 1 ≤ n, m ≤ 10^6.

The following lines will contain the answers to your queries.

Output

Once you know have found the minimum value r, you should print ! r to the standard output.

Interaction

Your code is allowed to query for an entry (i, j) of a matrix (i.e. get the height of the tree which is in the i-th row and j-th column). The query should be formatted as ? i j, so that 1 ≤ i ≤ n and 1 ≤ j ≤ m.

You may assume that the entries of the matrix will be integers between 1 and 10^9.

Your solution should use not more than 4 ⋅ (n + m) queries.

This is an interactive problem. You have to use a flush operation right after printing each line. For example, in C++ you should use the function fflush(stdout), in Java — System.out.flush(), in Pascal — flush(output) and in Python — sys.stdout.flush().

Example

Input


5 5
13 15 10 9 15
15 17 12 11 17
10 12 7 6 12
17 19 14 13 19
16 18 13 12 18


Output

Solution (in JAVA):

Solution:
//package bubblecup13.f;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class M {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni(), m = ni();
		List<Integer> cols = new ArrayList<>();
		for(int i = 0;i < m;i++){
			cols.add(i);
		}
		int[] minima = new int[n];
		Arrays.fill(minima, m-1);
		int[] valmin = new int[n];
		Arrays.fill(valmin, Integer.MAX_VALUE);
		SMAWK(cols, 0, n-1, 1, minima, valmin);

		int ans = 0;
		for(int i = 0;i < n;i++){
			if(valmin[i] < valmin[ans]){
				ans = i;
			}
		}
		out.println("! " + valmin[ans]);
		out.flush();
	}

	Map<Long, Integer> cache = new HashMap<>();

	int f(int i, int j)
	{
		long code = (long)i<<32|j;
		if(cache.containsKey(code))return cache.get(code);
		out.println("? " + (i+1) + " " + (j+1));
		out.flush();
		int ret = ni();
		cache.put(code, ret);
		return ret;
	}

	void SMAWK(List<Integer> js, int ib, int ie, int id, int[] minima, int[] valmin) {
		if (ib > ie) return;

		Deque<Integer> js2 = new ArrayDeque<>();
		for (int q = 0, i = ib; q < js.size(); ++q) {
			while (!js2.isEmpty() && f(i, js2.getLast()) >= f(i, js.get(q))) {
				js2.pollLast(); i -= id; }
			if ( js2.size() != (ie-ib)/id ) {
				js2.addLast(js.get(q)); i += id; }
		}

		SMAWK(new ArrayList<>(js2), ib+id, ie, id*2, minima, valmin);

		for (int i = ib, q = 0; i <= ie; i += id*2) {
			int jt = (i + id <= ie ? minima[i+id] : js.get(js.size()-1));
			int fm = Integer.MAX_VALUE, fq;
			for (; q < js.size(); ++q) {
				if ( fm > (fq = f(i, js.get(q))) ) {
					fm = fq;
					minima[i] = js.get(q);
					valmin[i] = fq;
				}
				if (js.get(q).equals(jt)) break;
			}
		}
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	
	public static void main(String[] args) throws Exception { new M().run(); }
	
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	
	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	
	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	
	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}