atcoder#ARC137A. [ARC137A] Coprime Pair
[ARC137A] Coprime Pair
Score : points
Problem Statement
You are given integers ().
Snuke is looking for a pair of integers that satisfy both of the conditions below.
Find the maximum possible value of in a pair that satisfies the conditions. It can be proved that at least one such pair exists under the Constraints.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
2 4
1
For , we have , which violates the condition. For , the conditions are satisfied. Here, the value of is . There is no such pair with a greater value of , so the answer is .
14 21
5
1 100
99