Execution time limit is 1 second Runtime memory usage limit is 128 megabytes Find the GCD (greatest common divisor) of two nonnegative integers.
GCD(a,b)=⎩⎨⎧a,b=0b,a=0GCD(a mod b,b),a≥bGCD(a,b mod a),a<b Input
Two integers a and b (a,b≤2⋅109).
Output
Print the GCD of numbers a and b.
Examples