#include #include //小数点出力用 //cout << fixed << setprecision(10) << ans; #include #include #include #include #include #include #include #include using ll = long long; using namespace std; #define modP7 1'000'000'007 #define modP 998244353 bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); } int clk4(int num) { return (num - 2) * (num % 2); } void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); } int main() { stack,pair>>S; S.push({ {0,50000},{0,50000} }); S.push({ {0,50000},{50001, 100000} }); S.push({ {50001,100000},{0,50000} }); S.push({ {50001,100000},{50001, 100000} }); vector> ans; while (!S.empty()) { cout << "? " << S.top().first.first << " " << S.top().first.second << " " << S.top().second.first << " " << S.top().second.second << endl; int r; cin >> r; if (r == 1) { if (S.top().first.first == S.top().first.second && S.top().second.first == S.top().second.second) { ans.push_back({ S.top().first.first ,S.top().second.first }); } else { S.push({ {S.top().first.first,(S.top().first.first + S.top().first.second) / 2},{S.top().second.first,(S.top().second.first + S.top().second.second) / 2} }); S.push({ {S.top().first.first,(S.top().first.first + S.top().first.second) / 2},{(S.top().second.first + S.top().second.second) / 2 + 1, S.top().second.second} }); S.push({ {(S.top().first.first + S.top().first.second) / 2 + 1, S.top().first.second},{S.top().second.first,(S.top().second.first + S.top().second.second) / 2} }); S.push({ {(S.top().first.first + S.top().first.second) / 2 + 1, S.top().first.second},{(S.top().second.first + S.top().second.second) / 2 + 1, S.top().second.second} }); } } else if (r == -1) { cout << "death"; return 0; } } cout << "! " << ans.size() << endl; for (int i = 0;i < ans.size();i++) { cout << ans[i].first << " " << ans[i].second << endl; } return 0; }