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 m = 100000000; int l = -m; int r = m; while (r - l > 2) { 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(); System.out.println("1 0 " + (l + r) / 2); long vm = sc.nextLong(); int y = (l + r) / 2; if (vm > vr) { y = r; } else if (vm > vl) { y = l; } l = -m; r = m; while (r - l > 2) { int m1 = (l * 2 + r) / 3; int m2 = (l + r * 2) / 3; System.out.println("1 " + m1 + " " + y); long v1 = sc.nextLong(); System.out.println("1 " + m2 + " " + y); long v2 = sc.nextLong(); if (v1 <= v2) { r = m2; } else { l = m1; } } System.out.println("1 " + l + " " + y); vl = sc.nextLong(); System.out.println("1 " + r + " " + y); vr = sc.nextLong(); System.out.println("1 " + (l + r) / 2 + " " + y); vm = sc.nextLong(); int x = (l + r) / 2; if (vm > vr) { x = r; } else if (vm > vl) { x = l; } System.out.println("2 " + x + " " + y); sc.close(); } }