def nod(x, y):
    while x != 0 and y != 0:
        if x > y:
            x = x % y
        else:
            y = y % x
    return(x + y)
import sys
a, b, c = map(int, sys.stdin.readline().split())
print(nod(a, b), end=' ')
print(nod(a, c), end=' ')
print(nod(b, c))