#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 main()
{
    gasit=false;
    n=200;
        for(i=0;i<n and gasit==false;i++)
        {
            //gasit=true;
            st=0;
            dr=n-1;
            while(st<=dr){


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

        }
    return 0;

}