#include "bits/stdc++.h" using namespace std; #define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i)) #define rep(i,j) FOR(i,0,j) #define each(x,y) for(auto &(x):(y)) #define mp make_pair #define mt make_tuple #define all(x) (x).begin(),(x).end() #define debug(x) cout<<#x<<": "<<(x)< pii; typedef vector vi; typedef vector vll; int ask(int x, int y) { cout << x << ' ' << y << endl; int res; cin >> res; if (res == 0)exit(0); return res; } int main(){ int x = 0, y = (ask(100000, 0) + ask(0, 0)) / 2; rep(i, 17) { int d = ask(x, y); if (d&(1 << i)) { x |= 1 << i; } } }