import sequtils,strutils,algorithm,math,sugar,macros,strformat import sets,tables,intsets,queues,heapqueue,bitops template get*():string = stdin.readLine().strip() macro unpack*(arr: auto,cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `arr`;()) for i in 0.. 1 and fastLog2(s) + fastLog2(t) > tooBig : return 4e18.int return x mod a + s * t var x = 1 var y = 1e18.int + 10 while true: if c <= f(y) and f(y-1) < c: quit $y,0 let m = (x+y) div 2 if f(m) < c : x = m else : y = m