Hide

Problem A
GCD

Given two integers $A$ and $B$, compute their greatest common divisor.

Input

The first and only line contains the integers $A$ and $B$ ($1 \le A, B \le 10^9$).

Output

Output a single integer – the greatest common divisor of $A$ and $B$.

Sample Input 1 Sample Output 1
5 7
1
Sample Input 2 Sample Output 2
10 15
5

Please log in to submit a solution to this problem

Log in