from fractions import gcd

a, b = list(map(int, input().split()))
print(gcd(a,b)) from fractions import gcd a, b = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b print(gcd(a,b)) print gcd(a,b) gcd a b b = list(map(int, input().split())) list(map(int, input().split())) b a, b = list(map(int, input().split())) list(map(int, input().split())) a
from fractions import gcd

a, b = list(map(int, input().split()))
print(gcd(a,b))