a = int(input())
b = int(input())
c = int(input())
x = min(a, b, c)
if x == a:
y = min(b, c)
elif x == b:
y = min(a, c)
else:
y = min(a, b)
print(x + y)
if x > y:
print(x - y)
print(y - x)
a = int(input())
b = int(input())
c = int(input())
x = min(a, b, c)
if x == a:
y = min(b, c)
elif x == b:
y = min(a, c)
else:
y = min(a, b)
print(x + y)
if x > y:
print(x - y)
else:
print(y - x)