N = int(input()) lx, rx = -10**8, 10**8 while rx - lx+1 >= 6: l, r = (lx*2+rx)//3, (lx+rx*2)//3 print(1, l, 0) resl = int(input()) print(1, r, 0) resr = int(input()) if resl < resr: rx = r elif resl == resr: rx = r lx = l else: lx = l ansx = lx nowmin = 10**18 for i in range(lx, rx+1): print(1, i, 0) res = int(input()) if nowmin > res: nowmin = res ansx = i lx, rx = -10**8, 10**8 while rx - lx + 1 >= 6: l, r = (lx*2+rx)//3, (lx+rx*2)//3 print(1, ansx, l) resl = int(input()) print(1, ansx, r) resr = int(input()) if resl < resr: rx = r elif resl == resr: rx = r lx = l else: lx = l ansy = lx nowmin = 10**18 for i in range(lx, rx+1): print(1, i, 0) res = int(input()) if nowmin > res: nowmin = res ansy = i print(ansx, ansy)