#t473. 求两个正整数的最大公约数

求两个正整数的最大公约数

GCD of Two Positive Integers

Problem Description

Given two positive integers a,b(1<a,b≤109)a,b(1\lt a,b\le 10^9), output their greatest common divisor.

Input Format

Two positive integers a,b(1<a,b≤109)a,b(1\lt a,b\le 10^9).

Output Format

Their greatest common divisor.

Sample Input

30 50

Sample Output

10