Given an integer , find the smallest natural divisor of greater than . The constraints are 2 \le x < 10^{14}.
function solve(x: type): type; // Pascal
type solve(type x) // C++
def solve(x) // Python
This function should return the smallest divisor of that is greater than .
Here, type is an integer type appropriate for the problem's constraints (choose an appropriate type yourself).
For x = 2, the smallest divisor is .
For x = 9, the smallest divisor is .
Example 1