print((function (f, fh) local a,r={},10e5+1 for i=1,fh() do a[i]=fh() end table.sort(a) for i=1,#a-1 do r=f(a,i,r) end return r~=10e5+1 and r or 0 end)(function (a, i, n) return (a[i+1]-a[i]