from math import gcd
x,y = [int(i) for i in input().split()]
print(gcd(x,y))
 from math import gcd int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i x,y = [int(i) for i in input().split()] x [int(i) for i in input().split()] y print(gcd(x,y)) print gcd(x,y) gcd x y x,y = [int(i) for i in input().split()] [int(i) for i in input().split()] x y = [int(i) for i in input().split()] [int(i) for i in input().split()] y
from math import gcd
x,y = [int(i) for i in input().split()]
print(gcd(x,y))

