#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b A){ ll L = A.size(); FOR(i, 0, L){ if(i) cout << ' '; cout << A[i]; } cout << endl; } ll query(ll x, ll y){ p2(x, y); ll d; cin >> d; if(d==0) exit(0); return d; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll left = 0; ll left_d = query(left, 0); ll right = 100000; ll right_d = query(right, 0); while(left+1!=right){ ll center = (left+right)/2; ll d = query(center, 0); ll assumed_center_d = left_d - (center-left); if(assumed_center_d==d){ left = center; left_d = d; }else{ right = center; right_d = d; } } ll center_x = left; // Y left = 0; left_d = query(center_x, left); right = 100000; right_d = query(center_x, right); while(left+1!=right){ ll center = (left+right)/2; ll d = query(center_x, center); ll assumed_center_d = left_d - (center-left); if(assumed_center_d==d){ left = center; left_d = d; }else{ right = center; right_d = d; } } return 0; }