Sheng bill has an amazing ability for mental arithmetic and can even calculate the GCD (Greatest Common Divisor) of two huge numbers in his head! Because of this, he often challenges others to GCD calculation competitions. One day, Sheng bill arrogantly approached you and demanded a competition, but it would be very embarrassing to lose to him! Therefore, you decided to write a program to teach him a lesson.
Input
Two lines:
- First line: a number $A$.
- Second line: a number $B$.
Output
One line, representing the greatest common divisor of $A$ and $B$.
Examples
Input 1
12 54
Output 1
6
Subtasks
| Test Case | $A,B \leq $ |
|---|---|
| $1 \sim 2$ | $10^{18}$ |
| $3$ | $10^{100}$ |
| $4$ | $10^{500}$ |
| $5$ | $10^{5\,000}$ |
| $6$ | $10^{6\,000}$ |
| $7$ | $10^{7\,000}$ |
| $8 \sim 10$ | $10^{10\,000}$ |
For $100\%$ of the data, $1 \leq A,B \leq 10^{10\,000}$.