list = input().split()
list1 = []
for i in list:
    list1.append(int(i))
print(max(list1),min(list1),sep='\n')