#include using namespace std; #define FOR(i,m,n) for(int i=(m);i<(n);++i) #define REP(i,n) FOR(i,0,n) using ll = long long; constexpr int INF = 0x3f3f3f3f; constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL; constexpr double EPS = 1e-8; constexpr int MOD = 998244353; // constexpr int MOD = 1000000007; constexpr int DY4[]{1, 0, -1, 0}, DX4[]{0, -1, 0, 1}; constexpr int DY8[]{1, 1, 0, -1, -1, -1, 0, 1}; constexpr int DX8[]{0, -1, -1, -1, 0, 1, 1, 1}; template inline bool chmax(T& a, U b) { return a < b ? (a = b, true) : false; } template inline bool chmin(T& a, U b) { return a > b ? (a = b, true) : false; } struct IOSetup { IOSetup() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << fixed << setprecision(20); } } iosetup; int main() { int n, q; cin >> n >> q; const auto is_greater_than = [n](const int l, const int r) -> bool { cout << "? " << l + 1 << ' ' << n << ' ' << r + 1 << ' ' << n << endl; int x; cin >> x; assert(x != -1); return x == 1; }; vector> minmaxs; for (int i = 1; i < n; i += 2) { minmaxs.emplace_back(is_greater_than(i - 1, i) ? make_pair(i - 1, i) : make_pair(i, i - 1)); } if (n % 2 == 1) minmaxs.emplace_back(n - 1, n - 1); while (minmaxs.size() > 1) { vector> nxt; nxt.reserve((minmaxs.size() + 1) / 2); for (int i = 1; i < minmaxs.size(); i += 2) { const auto [l1, r1] = minmaxs[i - 1]; const auto [l2, r2] = minmaxs[i]; nxt.emplace_back(is_greater_than(l1, l2) ? l1 : l2, is_greater_than(r1, r2) ? r2 : r1); } if (minmaxs.size() % 2 == 1) nxt.emplace_back(minmaxs.back()); minmaxs.swap(nxt); } const auto& [l, r] = minmaxs.front(); cout << "! " << l + 1 << ' ' << l + 1 << ' ' << r + 1 << ' ' << n << endl; return 0; }