x, y = [int(n) for n in input().split()]
while True:
    tmp = x % y
    if tmp == 0:
        break
    x, y = y, tmp
print(y) int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n x, y = [int(n) for n in input().split()] x [int(n) for n in input().split()] y while True:
    tmp = x % y
    if tmp == 0:
        break
    x, y = y, tmp True tmp = x % y tmp x % y x y if tmp == 0:
        break
     tmp == 0 tmp 0 break x, y = y, tmp x y y tmp print(y) print y y = y, tmp tmp y x, y = y, tmp y x y = [int(n) for n in input().split()] [int(n) for n in input().split()] y x, y = [int(n) for n in input().split()] [int(n) for n in input().split()] x tmp = x % y x % y tmp
x, y = [int(n) for n in input().split()]
while True:
    tmp = x % y
    if tmp == 0:
        break
    x, y = y, tmp
print(y)