#include using namespace std; using pi=pair; int ask(int xl,int xr,int yl,int yr){ cout << "?"; cout << " " << xl; cout << " " << xr; cout << " " << yl; cout << " " << yr; cout << "\n"; fflush(stdout); int res; cin >> res; return res; } void ans(vector &a){ cout << "! " << a.size() << "\n"; for(auto &nx : a){ cout << nx.first << " " << nx.second << "\n"; } fflush(stdout); } const int sz=1000000; int main(){ vector res; int xl=0,xr=sz; while(xl<=xr){ if(ask(xl,xr,0,sz)==0){ break; } int ml=xl,mr=xr; while(ml<=mr){ int te=(ml+mr)/2; if(ask(xl,te,0,sz)==0){ml=te+1;} else{mr=te-1;} } int m=ml; int yl=0,yr=sz; while(yl<=yr){ if(ask(m,m,yl,yr)==0){break;} int nl=yl,nr=yr; while(nl<=nr){ int te=(nl+nr)/2; if(ask(m,m,yl,te)==0){nl=te+1;} else{nr=te-1;} } res.push_back({m,nl}); yl=nl+1; } xl=m+1; } ans(res); return 0; }