import sys lim = 10**5 def solve(): btm = 0 top = lim while btm != top: d = (top - btm) // 3 print(0, btm + d, flush=True) a1 = int(input()) print(0, top - d, flush=True) a2 = int(input()) if a1 < a2: top -= 1 else: btm += 1 print(0, btm, flush=True) a = int(input()) print(a, btm, flush=True) a = int(input()) return if __name__ == '__main__': solve()