#!/usr/bin/env python3
import functools
import fractions
n, *a = map(int, open(0).read().split())
gcd = functools.reduce(fractions.gcd, a)
print(gcd) import functools functools import fractions fractions n, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split *a a gcd = functools.reduce(fractions.gcd, a) gcd functools.reduce(fractions.gcd, a) functools.reduce functools reduce fractions.gcd fractions gcd a print(gcd) print gcd gcd = functools.reduce(fractions.gcd, a) functools.reduce(fractions.gcd, a) gcd n, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n
#!/usr/bin/env python3
import functools
import fractions
n, *a = map(int, open(0).read().split())
gcd = functools.reduce(fractions.gcd, a)
print(gcd)
