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