def log2(x): out = 0 while x > 0: x /= 2 out += 1 return out - 1 def break(x): x -= 1 n = int(x ** 0.5) while x % n != 0: n -= 1 return (n, x / n) def A(k): dd