Problem1001--Find GCD of two integers

1001: Find GCD of two integers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

Given two integers m and n (1<= m, n <= 1012) , please find GCD(m, n)

Input

Two integers m, n in a line

Output

One integer which is GCD(m, n)

Sample Input Copy

4 6

Sample Output Copy

2

Source/Category