import strutils, sequtils, algorithm let N = parseInt readLine stdin let a = map(split readLine stdin, parseInt).sorted(cmp) var cnt: tuple[mn, mx: int] = (int.high, a[^1] - a[0]) for i in 1 ..< N: cnt.mn = min(cnt.mn, a[i] - a[i - 1]) echo cnt.mn echo cnt.mx