#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define eps 0.000000001 #define LONG_INF 10000000000000000 #define MAX_MOD 1000000007 #define REP(i,n) for(long long i = 0;i < n;++i) int judge(int a, int b) { cout << a << " " << b << endl; int hoge; cin >> hoge; return hoge; } int main() { int x = 0; int x_top = 100000,x_bot = 0; while (x_top - x_bot > 2) { int left = (x_bot + x_bot + x_top) / 3; int right = (x_top + x_top + x_bot) / 3; if (judge(0,left) > judge(0,right)) { x_bot = left; } else { x_top = right; } } if (judge(0, x_bot) < judge(0, x_bot + 1)) { x = x_bot; } else { if (judge(0, x_bot + 1) < judge(0, x_bot + 2)) { x = x_bot + 1; } else { x = x_bot + 2; } } int y_top = 100000, y_bot = 0; while (y_top - y_bot > 2) { int left = (y_bot + y_bot + y_top) / 3; int right = (y_top + y_top + y_bot) / 3; if (judge(left,x) > judge(right,x)) { y_bot = left; } else { y_top = right; } } for (int i = 0;i < 3;++i) { judge(y_bot + i, x); } return 0; }