Problem: The only difference between the easy and the hard version is the limit to the number of queries.

This is an interactive problem.

There is an array a of n different numbers. In one query you can ask the position of the second maximum element in a subsegment a[l..r]. Find the position of the maximum element in the array in no more than 20 queries.

A subsegment a[l..r] is all the elements a_l, a_{l + 1}, ..., a_r. After asking this subsegment you will be given the position of the second maximum from this subsegment in the whole array.

Input

The first line contains a single integer n (2 ≤ n ≤ 10^5) — the number of elements in the array.

Interaction

You can ask queries by printing "? l r" (1 ≤ l < r ≤ n). The answer is the index of the second maximum of all elements a_l, a_{l + 1}, ..., a_r. Array a is fixed beforehand and can't be changed in time of interaction.

You can output the answer by printing "! p", where p is the index of the maximum element in the array.

You can ask no more than 20 queries. Printing the answer doesn't count as a query.

After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. 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 



Hacks

To make a hack, use the following test format.

In the first line output a single integer n (2 ≤ n ≤ 10^5). In the second line output a permutation of n integers 1 to n. The position of n in the permutation is the position of the maximum

Example

Input


5

3

4



Output


? 1 5

? 4 5

! 1

Note

In the sample suppose a is [5, 1, 4, 2, 3]. So after asking the [1..5] subsegment 4 is second to max value, and it's position is 3. After asking the [4..5] subsegment 2 is second to max value and it's position in the whole array is 4.

Note that there are other arrays a that would produce the same interaction, and the answer for them might be different. Example output is given in purpose of understanding the interaction.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;


public class Solution {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

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

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }

        float nextFloat() {
            return Float.parseFloat(nextToken());
        }
    }


    static FastReader f = new FastReader();
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static StringBuilder sb = new StringBuilder();
    private static final int mod = (int) (1e9 + 7);
    static int MAX = 500005;
    static long[] fact;

    static int[] inputArray(int n) throws IOException {
        int[] a = new int[n];
        for(int i = 0 ; i < n ; i++) {
//            a[i] = (int) (Math.random()*1e5 + 1);
            a[i] = f.nextInt();
        }
        return a;
    }
    static long[] inputLongArray(int n) throws IOException {
        long[] a = new long[n];
        for(int i = 0 ; i < n ; i++) {
            a[i] = f.nextLong();
//            a[i] = (long) (Math.random() * 1e9 + 1);
        }
        return a;
    }

    static long gcd(long a , long b) {
        if(a == 0 || b == 0) {
            return Math.max(a , b);
        }
        //System.out.println("a - " + a + " b - " + b);
        if(a % b == 0) {
            return b;
        }
        return gcd(b , a % b);
    }

    static void initializeFact() {
        fact = new long[MAX];
        for(int i = 0 ; i < fact.length ; i++) {
            if(i == 0) {
                fact[i] = 1;
            }
            else {
                fact[i] = fact[i-1] * i % mod;
            }
        }
    }

    static long longModulus(long x , long m) {
        if(x < m) {
            return x;
        }
        long d = x / m;
        return x - d * m;
    }


    static boolean[] sieveOfEratosthenes(int n)
    {
        boolean[] isPrime = new boolean[n+1];
        Arrays.fill(isPrime , true);
        isPrime[0] = false;
        isPrime[1] = false;
        for(int i = 2; i * i <= n ; i++)
        {
            for(int j = 2 * i ; j <= n; j += i)
                isPrime[j] = false;
        }
        return isPrime;
    }

    static long moduloInversePrime(long a) {
        //System.out.println("modulo inverse of " + a + " -> " + ans);
        return modPow(a , mod - 2);
    }

    static long mult(long a, long b)
    {
        return (a * b % mod);
    }

    static long modPow(long a, int step)
    {
        long ans = 1;
        while(step != 0)
        {
            if((step & 1) != 0)
                ans = mult(ans , a);
            a = mult(a , a);
            step >>= 1;
        }
        return ans;
    }

     static boolean isPrime(int n) {
        if(n == 1) {
            return false;
        }
        for(int i = 2 ; i <= Math.sqrt(n) ; i++) {
            if(n % i == 0) {
                return false;
            }
        }
        return true;
    }

    static int query(int l , int r) {
        System.out.println("? " + l + " " + r);
        System.out.flush();
        return f.nextInt();
    }

    public static void main(String[] args) throws IOException {
        int t = 1;
        for(int test = 0 ; test < t ; test++) {

            int n = f.nextInt();

            int l = 1, r = n;

            int m = query(l, r);

            boolean left = false;

            if(m != 1) {
                int x = query(l, m);
                if(x == m) {
                    r = m - 1;
                    left = true;
                }
                else {
                    l = m + 1;
                }
            }
            else {
                l = 2;
            }

            int ans = -1;

            while(l <= r) {
                int mid = (l+r) / 2;

//                System.out.println("l: " + l + ", r: " + r + ", mid: " + mid);

                if(left) {
                    int q = query(mid, m);
                    if(q == m) {
                        ans = mid;
                        l = mid + 1;
                    }
                    else {
                        r = mid - 1;
                    }
                }
                else {
                    int q = query(m, mid);
                    if(q == m) {
                        ans = mid;
                        r = mid - 1;
                    }
                    else {
                        l = mid + 1;
                    }
                }
            }

            System.out.println("! " + ans);
            System.out.flush();

        }
    }

    private static int split(int[] a, int l, int r, long[] preSum) {

        int low = l, high = r - 1;

        while(low <= high) {
            int mid = (low + high) / 2;
            if(preSum[mid+1] - preSum[l] == preSum[r+1] - preSum[mid+1]) {
                return mid;
            }
            else if(preSum[mid+1] - preSum[l] > preSum[r+1] - preSum[mid+1]) {
                high = mid - 1;
            }
            else {
                low = mid + 1;
            }
        }

        return -1;

    }


}

/*



 */