#Q210. 「一本通 6.3 练习 3」SuperGCD
「一本通 6.3 练习 3」SuperGCD
Description
Source: SDOI 2009
Sheng Bill possesses an astonishing mental arithmetic ability, even capable of calculating the GCD (Greatest Common Divisor) of two enormous numbers in his head! As a result, he often competes with others in GCD calculations. One day, Sheng Bill arrogantly approached you and challenged you to a contest. But losing to Sheng Bill would be quite embarrassing! So you decided to write a program to teach him a lesson.
Input Format
The input consists of two lines. The first line contains a number , and the second line contains a number .
Output Format
Output a single line representing the GCD of and .
Sample 1
12
54
6
Constraints & Hints
For all test cases, .