#include using namespace std; int f(int x, int y) { cout << x << " " << y << '\n'; cout.flush(); int ans; cin >> ans; return ans; } int main() { int x, y, num; x = 0; y = 199; while (1) { num = f(x, y); if (num < 0) ++x; else --y; } return 0; }