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

using namespace std;

int h, x, y;

int main ()
{
    h = 1;
    x = 0;
    y = 0;
    while ( h != 0 )
    {
        cout << x << " " << y << endl;
        cout.flush();
        cin >> h;
        y ++;
        if ( y == 200 )
        {
            y = 0;
            x ++;

        }
    }

    return 0;



    return 0;
}