func main() var n: int :: cui@inputInt() var dx: int :: n / 2 + 1 do cui@print("\{2 - n % 2} \{(n + 1) / 2}\n") do cui@flush() while(true) var t: int :: cui@inputInt() if(t = 0) ret end if var k: int :: cui@inputInt() var x: int :: cui@inputInt() do cui@print("\{k} \{x < dx ?(x + dx, x - dx)}\n") do cui@flush() end while end func