# include <iostream>
# include <algorithm>
# define endl '\n'

using namespace std;

int x, y, ok, h, m, n;

int main ()
{
    h = 1;
    x = 0;
    y = 100;
    int ok = 1;
    for ( int i = 1; i <= 400; i ++ )
    {
        cout << x << " " << y << endl;
        cout.flush();
        cin >> h;
        if ( h == 0 )
            return 0;
        if ( x == 199 )
        {
            if ( ok % 1 )
            {
                x = 0;
                y = y + ok;
                ok ++;
            }
            else
            {
                x = 0;
                y = y - ok;
                ok ++;

            }
        }
        else
            x ++;

    }



    return 0;
}