【題目敘述】https://zerojudge.tw/ShowProblem?problemid=a024
while True:
try:
a, b = map(int, input().split())
if a < b:
a, b = b, a
while True:
a, b = b, a%b
if b == 0:
print(a)
break
except:
break