#include <iostream>
#include <cstdio>

using namespace std;

int line, col, x;

int main() {
    for(line = 199; line >= 0; --line) {
        for(col = 199; col >= 0; --col) {
            cout << line << ' ' << col << '\n' << flush;
            cin >> x;
            if(x == 0) {
                return 0;
            }
        }
    }

    return 0;
}