def op(x, y): print(x, y) ret = int(input()) if ret == 0: exit() return ret def op2(x, y): ax, ay = -1, -2 print(x, y) if (x, y) == (ax, ay): print("correct") exit() return abs(ax - x) + abs(ay - y) a0 = op(0, 0) dir = [[1, 0], [0, 1], [-1, 0], [0, -1]] X = [] for x, y in dir: a = op(x, y) X.append(a - a0) if X.count(-1) == 1: i = X.index(-1) x = a0 * dir[i][0] y = a0 * dir[i][1] op(x, y) for i in range(4): if X[i] == -1 and X[(i + 1) % 4] == -1: break i1 = i i2 = (i + 1) % 4 x1 = a0 * dir[i1][0] y1 = a0 * dir[i1][1] a1 = op(x1, y1) x2 = a0 * dir[i2][0] y2 = a0 * dir[i2][1] a2 = op(x2, y2) if i1 & 1: a1,a2 =a2,a1 x3 = a2 // 2 * (dir[i1][0] + dir[i2][0]) y3 = a1 // 2 * (dir[i1][1] + dir[i2][1]) op(x3, y3)