import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int zeros = 0; ArrayList values = new ArrayList<>(); for (int i = 0; i < n; i++) { long x = sc.nextLong(); if (x == 0) { zeros++; } else { values.add(x); } } if (values.size() == 0) { System.out.println("Yes"); return; } Collections.sort(values); HashMap counts = new HashMap<>(); for (int i = 0; i < values.size() - 1; i++) { long x = values.get(i + 1) - values.get(i); counts.put(x, counts.getOrDefault(x, 0) + 1); } if (counts.containsKey(0L)) { if (counts.size() == 1) { System.out.println("Yes"); } else { System.out.println("No"); } return; } long gcd = 0; for (long x : counts.keySet()) { if (gcd == 0) { gcd = x; } else { gcd = getGCD(gcd, x); } } long sum = 0; for (long x : counts.keySet()) { sum += (x / gcd - 1) * counts.get(x); } if (sum <= zeros) { System.out.println("Yes"); } else { System.out.println("No"); } } static long getGCD(long x, long y) { if (x % y == 0) { return y; } else { return getGCD(y, x % y); } } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }