#include <bits/stdc++.h>

using namespace std;

int main()
{
    const int N = 200;

    int X = N / 2;
    int Y = N / 2;

    while (true)
    {
        cout << X << " " << Y << endl;
        cout.flush();

        int h;
        cin >> h;

        if (h == 0)
            break;

        if (h > 0)
            Y--;
        else
            X++;
    }



    return 0;
}