while True:
num1 = input("请输入第一个数:")
num2 = input("请输入第二个数:")
if num1.isdigit() and num2.isdigit():
j = max(eval(num1),eval(num2))
while j >= 1:
if eval(num1) % j == 0 and eval(num2) % j == 0:
print(j)
break
else:
j = j-1
else:
print("请输入数字")