Problem: Vasya likes to solve equations. Today he wants to solve , where and stand for integer division and modulo operations (refer to the Notes below for exact definition). In this equation, and are positive integer parameters, and is a positive integer unknown. If there are several solutions, Vasya wants to find the smallest possible . Can you help him?
Input Format: The first line contains two integers and (, ).
Output Format: Print a single integer — the smallest positive integer solution to . It is guaranteed that this equation has at least one positive integer solution.
Note: The result of integer division is equal to the largest integer such that . modulo (shortened ) is the only integer such that , and is divisible by .
In the first sample, and . Since , then is a solution to . One can see that is the only other positive integer solution, hence is the smallest one.