#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int L = 0, R = 100000; while (R - L > 2) { int M1 = (L * 2 + R) / 3; cout << M1 << " " << 0 << endl; int v1; cin >> v1; if (v1 == 0) return 0; int M2 = (L + R * 2) / 3; cout << M2 << " " << 0 << endl; int v2; cin >> v2; if (v2 == 0) return 0; if (v1 > v2) L = M1; else R = M2; } int vr; cout << R << " " << 0 << endl; cin >> vr; if (vr == 0) return 0; int vl; cout << L << " " << 0 << endl; cin >> vl; if (vl == 0) return 0; if (vl < vr) cout << L << " " << vl << endl; else if (vl > vr) cout << R << " " << vr << endl; else cout << L + 1 << " " << vl - 1 << endl; return 0; }