#abc133c. [abc133_c]Remainder Minimization 2019
[abc133_c]Remainder Minimization 2019
Problem Statement
You are given two non-negative integers and . We will choose two integers and such that . Find the minimum possible value of .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum possible value of when and are chosen under the given condition.
Sample Input 1
2020 2040
Sample Output 1
2
When , .
Sample Input 2
4 5
Sample Output 2
20
We have only one choice: .