# coding: utf-8 import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time sys.setrecursionlimit(10 ** 7) INF = 10 ** 20 MOD = 10 ** 9 + 7 def II(): return int(input()) def ILI(): return list(map(int, input().split())) def IAI(LINE): return [ILI() for __ in range(LINE)] def IDI(): return {key: value for key, value in ILI()} def requestNextDis(x, y): print("{} {}".format(x, y)) sys.stdout.flush() dis = int(input()) if dis == 0: sys.exit() else: return dis def main(): dis_zero = requestNextDis(0, 0) dis_x_max = requestNextDis(10 ** 5, 0) dis_y_max = requestNextDis(0, 10 ** 5) ans_x = (10 ** 5 - dis_x_max + dis_zero) // 2 ans_y = (10 ** 5 - dis_y_max + dis_zero) // 2 requestNextDis(ans_x, ans_y) if __name__ == "__main__": main()