#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"); } #define top() front().first int main() { queue < pair < pair, pair>, bool>> S; S.push({ { {0,1000000},{0,500000} },0 }); S.push({ { {0,1000000},{500001,1000000} },0 }); 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 { if (S.front().second == 1) { S.push({ { {S.top().first.first, S.top().first.second},{S.top().second.first,(S.top().second.first + S.top().second.second) / 2} },0 }); S.push({ {{S.top().first.first, S.top().first.second},{(S.top().second.first + S.top().second.second) / 2 + 1, S.top().second.second} },0 }); } else { S.push({ { {S.top().first.first,(S.top().first.first + S.top().first.second) / 2},{S.top().second.first,S.top().second.second} },1 }); S.push({ {{(S.top().first.first + S.top().first.second) / 2 + 1,S.top().first.second},{S.top().second.first,S.top().second.second} },1 }); } } } else if (r == -1) { cout << "death"; return 0; } S.pop(); } cout << "! " << ans.size() << endl; for (int i = 0;i < ans.size();i++) { cout << ans[i].first << " " << ans[i].second << endl; } return 0; }