#include "bits/stdc++.h" using namespace std; #define ll long long int #define rep(i,n) for( int i = 0; i < n; i++ ) #define rrep(i,n) for( int i = n; i >= 0; i-- ) #define REP(i,s,t) for( int i = s; i <= t; i++ ) #define RREP(i,s,t) for( int i = s; i >= t; i-- ) #define dump(x) cerr << #x << " = " << (x) << endl; #define INF 2000000000 #define mod 1000000007 #define INF2 1000000000000000000 int main(void) { cin.tie(0); ios::sync_with_stdio(false); int X1 = 0, X2 = 1000000; int Y1 = 0, Y2 = 1000000; bool small = true; while (true) { int d1, d2; int Xm = (X1 + X2) / 2; int Ym = (Y1 + Y2) / 2; if (small) { cout << X1 << " " << Y1 << endl << flush; cin >> d1; if (d1 == 0) return 0; } else { cout << X2 << " " << Y2 << endl << flush; cin >> d2; if (d2 == 0) return 0; } if (d1 < d2) { X2 = Xm; Y2 = Ym; small = false; } else { X1 = Xm; Y1 = Ym; small = true; } } return 0; }