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 r = new Random(); var order = new List(); for (var i = 0; i < n; ++i) order.Add(i + 1); for (var i = n - 2; i >= 0; --i) { var pos = r.Next(i, n); (order[i], order[pos]) = (order[pos], order[i]); } var minlist = new List(); var max = order[0]; for (var i = 1; i < n; ++i) { var m2 = order[i]; WriteLine($"? {max} {n} {m2} {n}"); var x = NN; if (x == 1) { minlist.Add(max); max = m2; } else if (x == 0) { minlist.Add(m2); } else { return; } } while (minlist.Count > 1) { for (var i = minlist.Count - 2; i >= 0; --i) { var pos = r.Next(i, minlist.Count); (minlist[i], minlist[pos]) = (minlist[pos], minlist[i]); } var submax = minlist[0]; var nminlist = new List(); for (var i = 1; i < minlist.Count; ++i) { var m2 = minlist[i]; WriteLine($"? {submax} {n} {m2} {n}"); var x = NN; if (x == 1) { nminlist.Add(submax); submax = m2; } else if (x == 0) { nminlist.Add(m2); } else { return; } } minlist = nminlist; } WriteLine($"! {minlist[0]} {minlist[0]} {max} {n}"); } }