using System; using System.Linq; public class Hello{ public static void Main(){ int n = int.Parse(Console.ReadLine()); var nums = Console.ReadLine().Split().Select(int.Parse).ToArray(); int dif = nums[n-1] - nums[0]; int tmp=0; for(int i=0;itmp) dif=tmp; } Console.WriteLine(dif); Console.WriteLine(nums[n-1] - nums[0]); } }