import sys
b=[]
a=input().split(" ")
for i in a:
    b.append(int(i))

print(max(b))
print(min(b))