题目描述

(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

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解