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 c = NList; var (n, q) = (c[0], c[1]); var order = new int[n]; for (var i = 0; i < n; ++i) order[i] = i + 1; var small = new List(); var large = new List(); for (var i = 0; i < n; i += 2) { if (i + 1 == n) { WriteLine($"? {order[0]} {n} {order[i]} {n}"); var x = NN; if (x == 1) large.Add(order[i]); else if (x == 0) small.Add(order[i]); else return; } else { WriteLine($"? {order[i]} {n} {order[i + 1]} {n}"); var x = NN; if (x == 1) { small.Add(order[i]); large.Add(order[i + 1]); } else if (x == 0) { small.Add(order[i + 1]); large.Add(order[i]); } else { return; } } } var min = small[0]; for (var i = 1; i < small.Count; ++i) { WriteLine($"? {min} {n} {small[i]} {n}"); var x = NN; if (x == 0) { min = small[i]; } else if (x != 1) return; } var max = large[0]; for (var i = 1; i < large.Count; ++i) { WriteLine($"? {max} {n} {large[i]} {n}"); var x = NN; if (x == 1) { max = large[i]; } else if (x != 0) return; } WriteLine($"! {min} {min} {max} {n}"); } }