#include using namespace std; int query(int x, int y) { cout << x << " " << y << endl; int d; cin >> d; return d; } int main() { int lim = 100000; int d1 = query(0, 0); int d2 = query(0, 100000); int ax = (d1 + lim - d2) / 2; int ay = (d1 + d2 - lim) / 2; cout << ax << " " << ay << endl; }