import java.io.*; import java.util.*; public class Main_yukicoder514 { private static Scanner sc; private static Printer pr; private static void solve() { query(0, 0); long a0 = sc.nextLong(); if (a0 == 0) { return; } query(1_000_000_000, 0); long a1 = sc.nextLong(); if (a1 == 0) { return; } int[] dx = {0, 1, 1, 0, -1, -1, -1, 0, 1}; int[] dy = {0, 0, 1, 1, 1, 0, -1, -1, -1}; long tmpx = (a0 - a1 + 1_000_000_000) / 2; long tmpy = (a0 + a1 - 1_000_000_000) / 2; for (int i = 0, size = dx.length; i < size; i++) { query(tmpx + dx[i], tmpy + dy[i]); long tmp = sc.nextLong(); if (tmp == 0) { return; } } } private static void query(long x, long y) { pr.printf("%d %d\n", x, y); pr.flush(); return; } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }