#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); auto ask = [&](int x, int y){ int res; cout << x << ' ' << y << endl; cin >> res; if(res == 0) exit(0); return res; }; pair mn = {1 << 30, -1}; int l = 0, r = 100000, c1, c2; while(l + 2 < r){ c1 = (2 * l + r) / 3; c2 = (l + 2 * r) / 3; int v1 = ask(c1, 0), v2 = ask(c2, 0); if(v1 > v2) l = c1; else r = c2; } for(int i = l; i <= r; i++){ mn = min(mn, make_pair(ask(i, 0), i)); } ask(mn.second, mn.first); }