import numpy as np



n = int(eval(input()))

lists = list(map(int, input().split()))



arr = np.array(lists)

maximum = arr.max()

minimum = arr.min()

print((maximum - minimum))
n = int(eval(input()))

lists = list(map(int, input().split()))

 

lists.sort()

print((lists[-1] - lists[0]))
import numpy as np

n = int(eval(input()))
lists = list(map(int, input().split()))
arr = np.array(lists)
maximum = arr.max()
minimum = arr.min()
print((maximum - minimum))

n = int(eval(input()))
lists = list(map(int, input().split()))
lists.sort()
print((lists[-1] - lists[0]))

-import numpy as np - -arr = np.array(lists) -maximum = arr.max() -minimum = arr.min() -print((maximum - minimum)) +lists.sort() +print((lists[-1] - lists[0]))