#include<stdio.h>

int main() {
    int i, j, x, n;

    i = 0;
    j = 199;
    x = -1;
    while(x != 0 && j >= 0 && i <= 199) {
        printf("%d %d\n", i, j);
        fflush(stdout);
        scanf("%d", &x);

        if(x > 0)
            -- j;
        if(x < 0)
            ++ i;
    }


    return 0;
}