#Q207. 「一本通 6.3 例 3」最大公约数

「一本通 6.3 例 3」最大公约数

Description

Given two positive integers AA and BB, find their greatest common divisor.

Input Format

The input consists of two lines. The first line contains a positive integer AA, and the second line contains a positive integer BB.

Output Format

Output a single integer on the first line, representing the greatest common divisor of AA and BB.

Sample 1

18
24

6

Constraints and Hints

For 60%60\% of the data, 1A,B10181\le A,B\le 10^{18};
For 100%100\% of the data, 1A,B1030001\le A,B\le 10^{3000}.