//Dragan Andrei Gabriel //University of Bucharest #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int n, m, x, y, v[201][201], t; int main() { #ifndef ONLINE_JUDGE freopen("a.in", "r", stdin); freopen("a.out", "w", stdout); #endif t = 1000; x = y = 100; while (t != 0) { printf("%d %d\n", x, y); fflush(stdout); scanf("%d", &t); printf("\n"); fflush(stdout); v[x][y] = t; if (t > 0) { for (int i = x + 1; i <= 200; i++) for (int j = 1; j <= 200; j++) v[i][j] = t; for (int i = 0; i <= 200; i++) for (int j = y + 1; j <= 200; j++) v[i][j] = t; } else if (t < 0) { for (int i = 0; i <= x; i++) for (int j = 0; j <= y; j++) v[i][j] = t; } if (v[x / 2][y / 2] == 0) { x /= 2; y /= 2; continue; } if (v[x * 2][y * 2] == 0 && x * 2 < 200 && y * 2 < 200) { x *= 2; y *= 2; continue; } if (v[x / 2][y] == 0) { x /= 2; continue; } if (v[x][y / 2] == 0) { x /= 2; continue; } for (int i = 0; i < 200; i++) for (int j = 0; j < 200; j++) if (v[i][j] == 0) { x = i; y = i; continue; } } return 0; }