number = list(map(int, (input().split())))
print(max(number))
print(min(number))