#include<cstdio>
#include<iostream>
#include<vector>
#include <cstring>
using namespace std;


int n,m,k,i,j,p,x,y,st,dr,mij;
bool gasit;

int binar(int st,int dr)
{
    int mij;
    while(st<=dr){
        mij =(st+dr)/2;
        printf("%d %d\n",i,mij);
        scanf("%d",&y);
        if(y==0)
        {
            return 1;
        }
        if(y>0)
        {
            dr=mij-1;
        }
        else
            st=mij+1;
    }

}

int main()
{
    gasit=false;
    n=200;i=0;
        while(true and i<=199)
        {
            st=0;
            dr=n-1;
            if(binar(st,dr)==1)
            {
                break;
            }
            else i++;

        }
    return 0;

}