import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextLong(); } sc.close(); Arrays.sort(a); long max = 0; long min = 9; long z = 0; long mind = 1000000000000000000L; for (int i = 0; i < n; i++) { if (a[i] == 0) { z++; } else { max = Math.max(max, a[i]); min = Math.min(min, a[i]); if (i > 0) { mind = Math.min(mind, a[i] - a[i - 1]); } } } for (int i = (int) z + 1; i < n; i++) { long d = a[i] - a[i - 1]; if (mind == 0) { if (d > 0) { System.out.println("No"); return; } } else if (d % mind != 0 || d == 0) { System.out.println("No"); return; } else { z -= d / mind - 1; if (z < 0) { System.out.println("No"); return; } } } System.out.println("Yes"); } }