data = list(map(int,input().split()))
if(data[0] < data[1]): data[0],data[1] = data[1],data[0]

def gcd(x,y):
    return x if y == 0 else gcd(y,x%y)

print(gcd(data[0],data[1])) data = list(map(int,input().split())) data list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split if(data[0] < data[1]): data[0],data[1] = data[1],data[0] data[0] < data[1] data[0] data 0 data[1] data 1 def gcd(x,y):
    return x if y == 0 else gcd(y,x%y) gcd return x if y == 0 else gcd(y,x%y) x if y == 0 else gcd(y,x%y) y == 0 y 0 x gcd(y,x%y) gcd y x%y x y x x y y print(gcd(data[0],data[1])) print gcd(data[0],data[1]) gcd data[0] data 0 data[1] data 1 def gcd(x,y):
    return x if y == 0 else gcd(y,x%y) def gcd(x,y):
    return x if y == 0 else gcd(y,x%y) gcd data = list(map(int,input().split())) list(map(int,input().split())) data
data = list(map(int,input().split()))
if(data[0] < data[1]): data[0],data[1] = data[1],data[0]

def gcd(x,y):
    return x if y == 0 else gcd(y,x%y)

print(gcd(data[0],data[1]))
