s = list(map(int,input().split())) a = s[0] b = s[1] c = s[2] while a != 0 and b != 0: if a > b: a %= b else: b %= a ab = a + b a = s[0] b = s[1] c = s[2] while a != 0 and c != 0: if a > c: a %= c else: c %= a ac = a + c a = s[0] b = s[1] c = s[2] while c != 0 and b != 0: if c > b: c %= b else: b %= c bc = c + b print(ab, ac, bc)