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.InputMismatchException;

/**
 * Created by Wilson on
 * Feb. 08, 2021
 */
public class HardMaxelementInteractive {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        CSearchingLocalMinimum solver = new CSearchingLocalMinimum();
        solver.solve(in, out);
        out.close();
    }

    static class CSearchingLocalMinimum {
        OutputWriter out;
        InputReader in;

        int query(int l,int r) {
            out.printLine("?", l+1,r+1);
            out.flush();
            return in.readInt()-1;
        }

        void writeOutput(int ans) {
            out.printLine("!", ans);
            out.flush();
        }

        public void solve(InputReader in, OutputWriter out) {
            this.out = out;
            this.in = in;
            int n = in.readInt();

            if (n == 1) {
                writeOutput(1);
                return;
            }
            //The idea here is to use the first divide the array into 2 halfs
            //and checks which side of the array as the biggest element
            //1)if first side has it,  query b/w mid and smax always changing l and
            //r, get the middle of l and r and then query for second largest b/w middle and smax(which is to the right)
            //since l side always gets mid whenever new query is equal to smax, then we return the
            //r whenever r-l <= 1

            //2) if the second side has the biggest, always query between mid and smax (which is to left end of the
            // first accepted part)
            //here, r side always gets the mid whenever new query (mid, smax) returns value equal to smax
            //then we return l whenever r - l <= 1
            int l,r,smax,mid,ans;
                l =1;
                r = n;

            smax = query(0, n - 1);
                if (smax == 0 || query(0, smax) != smax) {
                 l = smax; r = n - 1;
                while (r - l > 1) {
                    int m = (l + r) / 2;
                    if (query(smax, m) == smax) {
                        r = m;
                    } else {
                        l = m;
                    }
                }
                writeOutput(r+1);
            } else {
                 l = 0; r = smax;
                while (r - l > 1) {
                    int m = (l + r) / 2;
                    if (query(m, smax) == smax) {
                        l = m;
                    } else {
                        r = m;
                    }
                }
                writeOutput(l+1);
            }
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}