a = int(input())
b = int(input())
c = int(input())
if a>b and a>c:
d = a
if b>c:
e = c
else:
e = b
if b>a and b>c:
d = b
if a>c:
e = a
if c>a and c>b:
d = c
if b>a:
print(d + e , d - e)
a, b, c = map(int, list(input().split()))
print(max(a, b, c) + min(a, b, c))
a = int(input())
b = int(input())
c = int(input())
if a>b and a>c:
d = a
if b>c:
e = c
else:
e = b
if b>a and b>c:
d = b
if a>c:
e = c
else:
e = a
if c>a and c>b:
d = c
if b>a:
e = a
else:
e = b
print(d + e , d - e)
a, b, c = map(int, list(input().split()))
print(max(a, b, c) + min(a, b, c))