import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int x = getValue(true, sc); int y = getValue(false, sc); System.out.println("2 " + x + " " + y); System.out.flush(); } static int getValue(boolean isX, Scanner sc) { int left = -100000000; int right = 100000000; while (right - left > 2) { int m1 = (left * 2 + right) / 3; int m2 = (left + right * 2) / 3; System.out.println(getQuery(m1, isX)); System.out.flush(); long r1 = sc.nextLong(); System.out.println(getQuery(m2, isX)); System.out.flush(); long r2 = sc.nextLong(); if (r1 < r2) { right = m2; } else { left = m1; } } int ans = 0; long min = Long.MAX_VALUE; for (int i = left; i <= right; i++) { System.out.println(getQuery(i, isX)); System.out.flush(); long r = sc.nextLong(); if (min > r) { min = r; ans = i; } } return ans; } static String getQuery(int value, boolean isX) { if (isX) { return "1 " + value + " 0"; } else { return "1 0 " + value; } } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }