import std; void main() { long N; readf("%d\n", N); auto A = readln.chomp.split.to!(long[]); A.sort!"a > b"; long mx = A[0], mn = A[0]; long[] B; foreach (i; 1 .. N) { if (A[i] == 0) break; B ~= A[i-1] - A[i]; mn = min(mn, A[i]); } bool isOK = true; if (!B.empty) { long g = B.fold!gcd; isOK = mx <= mn + g * (N - 1); } writeln(isOK ? "Yes" : "No"); }