def fx(x): print(1, x, 0, flush=True) d = int(input()) return d def fy(y): print(1, 0, y, flush=True) d = int(input()) return d import sys input = sys.stdin.readline N = int(input()) INF = 10**8+1 left = -INF right = INF limit = 3 while left + limit < right: c1 = left + (right-left)//3 c2 = right - (right-left)//3 #print(left, right, c1, c2) #更新を行う if fx(c1) < fx(c2): right = c2 else: left = c1 tmp_x = fx(left) ans_x = left for x in range(left+1, right+1): ret = fx(x) if tmp_x>ret: tmp_x = ret ans_x = x left = -INF right = INF limit = 3 while left + limit < right: c1 = left + (right-left)//3 c2 = right - (right-left)//3 #更新を行う if fy(c1) < fy(c2): right = c2 else: left = c1 tmp_y = fy(left) ans_y = left for y in range(left+1, right+1): ret = fy(y) if tmp_y>ret: tmp_y = ret ans_y = y print(2, ans_x, ans_y, flush=True)