#include<fstream>
#include<iostream>
using namespace std;

int rez1 = 1, rez2 = 1;

void divide(int x, int y, int x1, int y1){

    if (rez1 == 0 or rez2 == 0)
        return;

    cout << x << " " << y << '\n';
    cout.flush();
    cin >> rez1;
    if (rez1 == 0)
        return;
    cout << x1 << " " << y1 << '\n';
    cout.flush();
    cin >> rez2;
    if (rez2 == 0)
        return;

    if (rez1 < 0 and rez2 > 0){
        divide(x, y, x1 / 2 + x, y1 / 2 + y);
        divide(x1 / 2 + 1 + x, y, x1, y1 / 2 + y);
        divide(x, y1 / 2 + 1 + y, x1 / 2 + x, y1);
        divide(x1 / 2 + 1 + x, y1 / 2 + 1 + y, x1, y1);
    }

}

int main(){
    divide(0, 0, 199, 199);
}