import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) input = sys.stdin.readline #n = int(input()) #alist = list(map(int,input().split())) #alist = [] n = int(input()) l,r = -2*10**8,2*10**8 p = [(100,100),(102,102)] def calc(x,y): print(1,x,y,flush=True) z = int(input()) #z = sum(abs(p[i][0] - x) + abs(p[i][1] - y) for i in range(len(p))) return z for _ in range(35): mid = (l+r)//2 a,b = calc(0,mid),calc(0,mid+1) if a <= b: r = mid else: l = mid ans1 = r l,r = -2*10**8,2*10**8 for _ in range(35): mid = (l+r)//2 a,b = calc(mid,0),calc(mid+1,0) if a <= b: r = mid else: l = mid ans2 = r print(2,ans2,ans1)