n=int(input()) ls=list(map(int,input().split())) ls.sort() lsdis=[] for i in range(n-1): lsdis.append(ls[i+1]-ls[i]) print(lsdis) lsnew=[] for i in range(len(lsdis)): if lsdis[i]!=0: lsnew.append(lsdis[i]) print(lsnew) print(min(lsnew))