RSA Factorization#367

RSA Factorization

2 seconds
64 megabytes
Very easy

Given a positive integer . It is known that n = p \times q, where and are prime numbers, p \leq q, and |q - k \times p| \leq 10^5 for some given positive integer . You need to find and .

Input

Each line contains two integers (1 < n < 10^{120}) and (0 < k < 10^8).

Output

For each pair of numbers and , print on a separate line the values of and such that p \leq q.

Examples

Example 1

Loading
Loading