a,b,c=input().split()
a = int(a)
b = int(b)
c=int(c)
a1=a
a2=a
b1=b
b2=b
c1=c
c2=c

while a != 0 and b != 0:
    if a > b:
        a %= b
    else:
        b %= a

res = a + b

while a1 != 0 and c != 0:
    if a1> c:
        a1%= c
    else:
        c %= a1
res1=a1+c

while c1 != 0 and b1 != 0:
    if c1> b1:
        c1 %= b1
    else:
        b1%= c1
res2=b1+c1

print (res, res1, res2)