func main() var x: int block var ok: int :: -1 var ng: int :: 100000 while((ok - ng).abs() > 1) var mid: int :: (ok + ng) / 2 var a: int :: f(mid, -1) var b: int :: f(mid + 1, -1) if(b < a) do ok :: mid else do ng :: mid end if end while do x :: ok end block var y: int block var ok: int :: -1 var ng: int :: 100000 while((ok - ng).abs() > 1) var mid: int :: (ok + ng) / 2 var a: int :: f(-1, mid) var b: int :: f(-1, mid + 1) if(b < a) do ok :: mid else do ng :: mid end if end while do y :: ok end block do cui@print("\{x} \{y}\n") func f(x: int, y: int): int do cui@print("\{x} \{y}\n") do cui@flush() ret cui@inputInt() end func end func