def ask(x, y): print(1, x, y, flush=True) global cnt return int(input()) n = int(input()) l = -(10**9) r = 10**9 while r - l > 2: llr = (2 * l + r) // 3 rrl = (l + 2 * r) // 3 if ask(llr, 0) < ask(rrl, 0): r = rrl else: l = llr mi = ask(l, 0) x = l for i in range(l + 1, r + 1): if ask(i, 0) < mi: mi = ask(i, 0) x = i l = -(10**9) r = 10**9 while r - l > 2: llr = (2 * l + r) // 3 rrl = (l + 2 * r) // 3 if ask(x, llr) < ask(x, rrl): r = rrl else: l = llr mi = ask(x, l) y = l for i in range(l + 1, r + 1): if ask(x, i) < mi: mi = ask(x, i) y = i print(2, x, y, flush=True)