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