using System; class S25_duck{ public static int Main(string[] args){ int n; string ans = "YES"; n = int.Parse(Console.ReadLine()); int[] duck = new int[n]; for(int i = 0; i < n; i++){ duck[i] = int.Parse(Console.ReadLine()); } Array.Sort(duck); int a = duck[1] - duck[0]; for(int i = 2; i < n; i++){ if((duck[i] - duck[i-1] != a) || duck[i] == duck[i-i]){ ans = "NO"; break; } } Console.WriteLine(ans); return 0; } }