import java.util.Arrays; import java.util.Scanner; import java.util.concurrent.SynchronousQueue; class Main { int N, M; int[] X, Y; public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); // [0,10^5]*[0,10^5] // 三分探索 // 一回の操作で2/3 int lX = 0, rX = 1_000_00; int lY = 0, rY = 1_000_00; for (int i = 0; i < 24; ++i) { int lx = (2 * lX + rX) / 3; int rx = (lX + 2 * rX) / 3; System.out.println(lx + " " + 0); int vl = sc.nextInt(); System.out.println(rx + " " + 0); int vr = sc.nextInt(); if (vl < vr) { lX = lx; } else { rX = rx; } } for (int i = 0; i < 24; ++i) { int ly = (2 * lY + rY) / 3; int ry = (lY + 2 * rY) / 3; System.out.println(lX + " " + ly); int vl = sc.nextInt(); System.out.println(lX + " " + ry); int vr = sc.nextInt(); if (vl < vr) { lY = ly; } else { rY = ry; } } System.out.println(rX + " " + rY); int vl = sc.nextInt(); System.out.println(rX + " " + lY); int vr = sc.nextInt(); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }