N = int(input()) lx, rx = -10 ** 9, 10 ** 9 while lx + 2 < rx: m1 = lx + (rx - lx) // 3 m2 = rx - (rx - lx) // 3 print(1, m1, 0, flush = True) c1 = int(input()) print(1, m2, 0, flush = True) c2 = int(input()) if c1 < c2: rx = m2 else: lx = m1 ly, ry = -10 ** 9, 10 ** 9 while ly + 2 < ry: m1 = ly + (ry - ly) // 3 m2 = ry - (ry - ly) // 3 print(1, 0, m1, flush = True) c1 = int(input()) print(1, 0, m2, flush = True) c2 = int(input()) if c1 < c2: ry = m2 else: ly = m1 ax, ay = 0, 0 m = 10 ** 18 for i in range(lx - 2, lx + 3): for j in range(ly - 2, ly + 3): if abs(i) <= 10 ** 9 and abs(j) <= 10 ** 9: print(1, i, j, flush = True) c = int(input()) if c < m: m = c ax, ay = i, j print(2, ax, ay, flush = True)