def GCD(x, y): while y: x, y = y, x % y return x x,y,z=map(int,(input().split(' '))) print(GCD(x,y),GCD(x,z),GCD(y,z))