import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int l = -100000000; int r = 100000000; while (r - l > 1) { int m1 = (l * 2 + r) / 3; int m2 = (l + r * 2) / 3; System.out.println("1 0 " + m1); long v1 = sc.nextLong(); System.out.println("1 0 " + m2); long v2 = sc.nextLong(); if (v1 <= v2) { r = m2; } else { l = m1; } } System.out.println("1 0 " + l); long vl = sc.nextLong(); System.out.println("1 0 " + r); long vr = sc.nextLong(); int x = l; if (vl > vr) { x = r; } l = -100000000; r = 100000000; while (r - l > 1) { int m1 = (l * 2 + r) / 3; int m2 = (l + r * 2) / 3; System.out.println("1 " + x + " " + m1); long v1 = sc.nextLong(); System.out.println("1 " + x + " " + m2); long v2 = sc.nextLong(); if (v1 <= v2) { r = m2; } else { l = m1; } } System.out.println("1 " + x + " " + l); vl = sc.nextLong(); System.out.println("1 " + x + " " + r); vr = sc.nextLong(); int y = l; if (vl > vr) { y = r; } System.out.println("2 " + x + " " + y); sc.close(); } }