using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var a1 = Question(1); var left = 1; var right = n + 1; while (right - left > 1) { var center = (left + right) / 2; if (center == n) break; var ac = Question(center); if (ac == 0) { if (center > n / 2) Answer(1, center); else Answer(center + 1, n); return; } if ((ac > 0) == (a1 > 0)) left = center; else right = center; } Answer(2, n - 1); } static int Question(int k) { WriteLine($"? {k}"); return NN * 2 - k; } static void Answer(int l, int r) { WriteLine($"! {l} {r}"); } }