(Greatest Common Divisor) The greatest common divisor (GCD) of two integers is the largest integer that evenly divides each of the numbers. Write a function gcd that returns the greatest common divisor of two integers.
(Greatest Common Divisor) The greatest common divisor (GCD) of two integers is the largest integer that evenly divides each of the numbers. Write a function gcd that returns the greatest common divisor of two integers.
The input consists of n (0<n<100) lines.
Each line consists of two integers(range from 1 to 200).
The last line of input consists of Int(-1).
输入
5 20 15 18 14 63 15 63 -1
输出
5 3 7 3