import math, sequtils, strutils let n = parseInt readLine stdin a = stdin.readLine.split.map parseInt var minV = a[1] - a[0] for i in 1 .. n.pred 2: minV = minV.min a[succ i] - a[i] echo minV echo a[^1] - a[0]