from fractions import gcd
x, y = map(int, input().split())
print(gcd(x, y)) from fractions import gcd x, y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y print(gcd(x, y)) print gcd(x, y) gcd x y x, y = map(int, input().split()) map(int, input().split()) x y = map(int, input().split()) map(int, input().split()) y
from fractions import gcd
x, y = map(int, input().split())
print(gcd(x, y))