a, b, c = map(int, input().split())

def nod(a, b):
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return a + b

g = nod(a, b), nod(a, c), nod(b, c)
print(g)