N=int(input()) ok=10**9+1 ng=-10**9-1 ansx=0 while abs(ok-ng)>1: m=(ok+ng)//2 print(1,m,0,flush=True) d1=int(input()) print(1,m+1,0,flush=True) d2=int(input()) if d1==d2: ok=m break elif d1>d2: ng=m else: ok=m ansx=ok ok=10**9+1 ng=-10**9-1 ansy=0 while abs(ok-ng)>1: m=(ok+ng)//2 print(1,0,m,flush=True) d1=int(input()) print(1,0,m+1,flush=True) d2=int(input()) if d1==d2: ok=m break elif d1>d2: ng=m else: ok=m ansy=ok print(2,ansx,ansy,flush=True)