import math from collections import Counter N = int(input()) A = list(map(int, input().split())) A.sort() zeros = A.count(0) nonzeros = N - zeros k = 0 for i in range(zeros, N-1): a, b = A[i], A[i+1] k = math.gcd(k, b - a) AA = Counter(A) check1, check2 = False, False for key, value in AA.items(): if key != 0: if value >= 2 and check2: exit(print("No")) if value >= 2: check1 = True if value == 1 and check1: exit(print("No")) if value == 1: check2 = True if k != 0: need = (A[-1] - A[zeros]) // k + 1 - nonzeros if need <= zeros: print("Yes") else: print("No") else: print("Yes")