题目描述
Problem Statement
Given are integers A and B. Find the maximum possible value of $\gcd(x, y)$ when we choose integers x and y so that A ≤ x < y ≤ B.
Here, $\gcd(x, y)$ denotes the greatest common divisor of x and y.
Input
Input is given from Standard Input in the following format:
A B
Output
Print the answer.
Constraints
- A and B are integers.
- 1 ≤ A < B ≤ $2 \times 10^5$
Sample Input 1
2 4
Sample Output 1
2
We have three ways to choose (x, y) such that A ≤ x < y ≤ B: (2,3), (2,4), (3,4), where the greatest common divisors are 1, 2, 1, respectively, so the maximum possible value is 2.
Sample Input 2
199999 200000
Sample Output 2
1
We have $\gcd(199999, 200000) = 1$.
Sample Input 3
101 139
Sample Output 3
34
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
2 4
样例输出
2