#include <iostream>

using namespace std;

int main()
{
    int x, a = 0, b = 0;

    cout << a << ' ' << b << '\n';
    cout.flush();
    cin >> x;

    while(x < 0 && a < 200 && b < 200)
    {
        ++a; ++b;
        cout << a << ' ' << b << '\n';
        cout.flush();
        cin >> x;
    }
    --a; --b;

    for(int i = a; i < 200; ++i)
        for(int j = b; j < 200; ++j)
        {
            cout << i << ' ' << j << '\n';
            cout.flush();
            cin >> x;
            if(x == 0)
            {
                i = 205;
                j = 205;
            }
            else if(x > 0)
            {
                j = 205;
            }
        }
    return 0;
}