import std.algorithm, std.conv, std.range, std.stdio, std.string; void main() { auto ans = int.max; auto x = 50000, y = 50000; auto xi = 0, xa = 100000, yi = 0, ya = 100000; for (;;) { writeln(xi, " ", y); auto ri = readln.chomp.to!int; writeln(xa, " ", y); auto ra = readln.chomp.to!int; writeln(x, " ", y); auto r = readln.chomp.to!int; if (xa - xi <= 2) { if (x <= xa && x <= xi) { break; } else if (xi <= x && xi <= xa) { x = xi; break; } else { x = xa; break; } } else { if (xi >= xa) { xi = x; x = (xa - xi) / 2; } else { xa = x; x = (xa - xi) / 2; } } } for (;;) { writeln(x, " ", yi); auto ri = readln.chomp.to!int; writeln(x, " ", ya); auto ra = readln.chomp.to!int; writeln(x, " ", y); auto r = readln.chomp.to!int; if (yi >= ya) { yi = y; y = (ya - yi) / 2; } else { ya = y; y = (ya - yi) / 2; } } }