X = 0 left, right = 0, 100000 while right - left > 1: mid = (left + right) // 2 print(X, mid, flush=True) D1 = int(input()) if D1 == 0: exit() print(X, mid + 1, flush=True) D2 = int(input()) if D2 == 0: exit() if D1 > D2: left = mid else: right = mid print(0, right, flush=True) D = int(input()) if D == 0: exit() print(D, right, flush=True)