N = int(input()) l = list(map(int, input().split())) min = abs(l[1] - l[0]) for i in range(N-1): if min > abs(l[i + 1] - l[i]): min = abs(l[i + 1] - l[i]) print(min,abs(l[-1] - l[0]))