using System.Collections.Generic; using System; using System.Drawing; namespace yukicoder { class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); var str = Console.ReadLine().Split(" "); int n = 0, ans = 0; List list = new List(N); for(int i = 0; i < N; i++) { list.Add(int.Parse(str[i])); if (list[n] == 0) { list.RemoveAt(n); n--; } n++; } list.Sort(); if (list.Count < 2) { Console.WriteLine("0"); } int temp = list[list.Count - 1]; for (int j = 0; j < list.Count ; j++) { ans = list[j + 1] - list[j]; if(ans < temp || j == list.Count - 2) { if(j == list.Count - 2) { Console.WriteLine(temp); break; } else if (ans == 0) { Console.WriteLine(list[j + 1] / list[j]); break; } else { temp = ans; } } } } } }