N=10
def max_min(a,n): #function definition
max=a[0]
min=a[0]
for i in range(n-1): #calculating max and min from list
if(a[i+1]>max):
max=a[i+1]
elif(a[i+1]<min):
min=a[i+1]
return (max,min)
li=raw_input("Enter %d numbers: " % N) #input of numbers from user
b=map(int, li.split())
big,small=max_min(b,N) #call function to calculate max and min
print "Largest: %d"%big #print max and min
print "Smallest: %d"%small