data = [int(n) for n in input().split(" ")];

def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m);

print(gcd(max(data), min(data))); 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 data = [int(n) for n in input().split(" ")] data [int(n) for n in input().split(" ")] def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m); gcd m = m % n m m % n m n if m == 0:
        return n;
     m == 0 m 0 return n n return gcd(n, m) gcd(n, m) gcd n m m m n n print(gcd(max(data), min(data))) print gcd(max(data), min(data)) gcd max(data) max data min(data) min data data = [int(n) for n in input().split(" ")] [int(n) for n in input().split(" ")] data def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m); def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m); gcd
data = [int(n) for n in input().split(" ")];

def gcd(m, n):
    m = m % n;
    if m == 0:
        return n;
    return gcd(n, m);

print(gcd(max(data), min(data)));
