using System; public class hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); var dmin = int.MaxValue; for (int i = 0; i < n-1; i++) dmin = Math.Min(dmin, a[i + 1] - a[i]); Console.WriteLine(dmin); Console.WriteLine(a[n - 1] - a[0]); } }