#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std;
int n = 200;

int main()
{
	int stx, sty, drx, dry, mijx, mijy, rez;
	stx = sty = 0;
	drx = dry = n - 1;
	while(1)
	{
		mijx = (stx + drx) / 2;
		mijy = (sty + dry) / 2;
		cout << mijx << ' ' << sty << "\n";
		cout.flush();
		cin >> rez;
		if(rez == 0)
			break;
		if(rez < 0)
		{
			cout << drx << ' ' << mijy << "\n";
			cout.flush();
			cin >> rez;
			if(rez == 0)
				break;
			if(rez < 0)
			{
				sty = mijy + 1;
				continue;
			}
			else
			{
				cout << stx << ' ' << mijy << "\n";
				cout.flush();
				cin >> rez;
				if(rez == 0)
					break;
				if(rez < 0)
				{
					cout << mijx << ' ' << dry << "\n";
					cout.flush();
					cin >> rez;
					if(rez == 0)
						break;
					if(rez < 0)
					{
						stx = mijx + 1;
						continue;
					}
					else
					{
						cout << mijx << ' ' << mijy << "\n";
						cout.flush();
						cin >> rez;
						if(rez == 0)
							break;
						if(rez < 0)
						{
							stx = mijx;
							sty = mijy;
						}
						else
						{
							drx = mijx;
							dry = mijy;
						}
					}
				}
				else
				{
					dry = mijy - 1;
					continue;
				}
			}
		}
		else
		{
			drx = mijx - 1;
			continue;
		}
	}
	return 0;
}