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

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

Explanation

Given two positive integers A and B, find their greatest common divisor.

Input format

The input consists of two lines, with a positive integer A in the first line and a positive integer B in the second line.

Output format

Output an integer on the first line representing the greatest common divisor of A,BA, B .

Example

18
24
6

Reminder


Data Range: For data of $60 \% $, $1 \ le A, B \ le 10 ^ {18} $; For data of $100 \% $, $1 \ le A, B \ le 10 ^ {3000} $.