def gcd(x,y):
    i=1
    while(i<=x and i<=y):
        if(x%i==0 and y%i==0):
            gcd=i
        i=i+1
    return gcd
x=int(input())
y=int(input())
print(gcd(x,y))
0a15252c95ed10d751c28f6263e729a2f0a84418
<mask token>

def gcd(x, y):
    i = 1
    while i <= x and i <= y:
        if x % i == 0 and y % i == 0:
            gcd = i
        i = i + 1
    return gcd


<mask token>

def gcd(x, y):
    i = 1
    while i <= x and i <= y:
        if x % i == 0 and y % i == 0:
            gcd = i
        i = i + 1
    return gcd


<mask token>
print(gcd(x, y))

def gcd(x, y):
    i = 1
    while i <= x and i <= y:
        if x % i == 0 and y % i == 0:
            gcd = i
        i = i + 1
    return gcd


x = int(input())
y = int(input())
print(gcd(x, y))

def gcd(x,y):
    i=1
    while(i<=x and i<=y):
        if(x%i==0 and y%i==0):
            gcd=i
        i=i+1
    return gcd
x=int(input())
y=int(input())
print(gcd(x,y))