#include <iostream>
#include <fstream>

using namespace std;

const int NMAX = 200;

void solve(int a, int b, int c, int d) {
    int m, n;
    m = (a + c) / 2;
    n = (b + d) / 2;

    cout << m << ' ' << n << '\n';
    cout.flush();

    int x;
    cin >> x;

    if (x == 0) return;
    if (x > 0) {
        c = m;
        d = n;
    }
    else {
        a = m;
        b = n;
    }

    solve(a, b, c, d);
}

int main() {
    solve(0, 0, 199, 199);
}