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