N = int(input()) def func(x, y): print(1, x, y) return int(input()) X, Y = -1, -1 LL = func(-(10**9), 0) LR = func(-(10**9-1), 0) RR = func(10**9, 0) RL = func(10**9-1, 0) if LL < LR: X = -(10**9) elif RR < RL: X = 10**9 else: left = -(10**9) right = 10**9 mid = -1 while True: mid = (left+right)//2 L = func(mid-1, 0) M = func(mid, 0) R = func(mid+1, 0) if L > M > R: left = mid elif L < M < R: right = mid else: break X = mid LL = func(0, -(10**9)) LR = func(0, -(10**9-1)) RR = func(0, 10**9) RL = func(0, 10**9-1) if LL < LR: Y = -(10**9) elif RR < RL: Y = 10**9 else: left = -(10**9) right = 10**9 mid = -1 while True: mid = (left+right)//2 L = func(0, mid-1) M = func(0, mid) R = func(0, mid+1) if L > M > R: left = mid elif L < M < R: right = mid else: break Y = mid print(2, X, Y)