N = int(input()) lx, rx = -10**8, 10**8 while rx != lx: 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 lx, rx = -10**8, 10**8 while rx != lx: 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 print(2, ansx, lx)