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.math.BigInteger;
import java.util.*;

public class TaskA {
    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        Task solver = new Task();
        solver.solve(in, out);
        out.close();
    }
    // main solver
    static class Task {
        Scanner sc = new Scanner(System.in);
        public void solve(InputReader in, PrintWriter out) {
            int t = 1;
            for (int i = 0; i < t; i++){
                solveOne(in, out);
            }
        }
        private int query(int l, int r){
            System.out.println("? " + l + " " + r);
            System.out.flush();
            int pos = sc.nextInt();
            return pos;
        }
        private void solveOne(InputReader in, PrintWriter out) {
           int n = sc.nextInt();
           int pos = query(1, n);
           int beg = 1, end = n;
           if (pos > 1){
               if (query(1, pos) == pos){
                   end = pos;
               }
               else{
                   beg = pos;
               }
           }
           else if (pos < n){
               if (query(pos, n) == pos){
                   beg = pos;
               }
               else{
                   end = pos;
               }
           }
           if (beg>=pos){
               if (beg == pos) beg++;
               while (beg < end - 1){
                   int mid = (beg + end) / 2;
                   int x = query(pos, mid);
                   if (x == pos){
                       end = mid;
                   }
                   else{
                       beg = mid;
                   }
               }
               if (end !=beg && query(pos, beg) != pos){
                   beg = end;
               }
               out.println("! " + beg);
           }
           else{
               if (end == pos){
                   end--;
               }
               assert(end < pos);
               while (beg < end - 1){
                   int mid = (beg + end) / 2;
                   int x = query(mid, pos);
                   if (x == pos){
                       beg = mid;
                   }
                   else{
                       end = mid;
                   }
               }
               if (end !=beg && query(end, pos) == pos){
                   beg = end;
               }
               out.println("! " + beg);
           }
        }
    }
    static class Point{
        public int x,y,z, ID;
        public Point(int x, int y, int z, int ID){
            this.x = x;
            this.y = y;
            this.z = z;
            this.ID = ID;
    }

        @Override
        public String toString() {
            return "[" + x + " " + y + " " + z + " " + ID + "]";
        }
    }
    static class SortByX implements Comparator<Point>{
        @Override
        public int compare(Point p1, Point p2) {
            return Integer.compare(p1.x, p2.x);
        }
    }
    static class SortByY implements Comparator<Point>{
        @Override
        public int compare(Point p1, Point p2) {
            if (p1.y != p2.y) return Integer.compare(p1.y, p2.y);
            if (p1.z > p2.z) return -1;
            return 1;
        }
    }
    // fast input reader class;
    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                String line = null;
                try {
                    line = br.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null) {
                    return null;
                }
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        public long nextLong(){
            return Long.parseLong(nextToken());
        }
    }
}