import java.io.*; import java.util.*; public class Main_yukicoder513 { private static Scanner sc; private static Printer pr; private static void solve() { query(0, 0); int a0 = sc.nextInt(); if (a0 == 0) { return; } query(100_000, 0); int a1 = sc.nextInt(); 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}; int tmpx = (a0 - a1 + 100_000) / 2; int tmpy = (a0 + a1 - 100_000) / 2; for (int i = 0, size = dx.length; i < size; i++) { query(tmpx + dx[i], tmpy + dy[i]); int tmp = sc.nextInt(); if (tmp == 0) { return; } } } private static void query(int x, int 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); } } }