import sys from sys import stdin import math N = int(input()) A = list(map(int,input().split())) A.sort() d = None z = 0 B = [] for i in range(N-1): if A[i] != 0: diff = A[i+1] - A[i] if d == None: d = diff else: d = math.gcd(d,diff) else: z += 1 for i in range(N): if A[i] != 0: B.append(A[i]) if len(B) == 0: print ("Yes") sys.exit() if d == 0: if max(B) == min(B): print ("Yes") else: print ("No") sys.exit() ind = 0 for i in range(B[0],B[-1]+1,d): if B[ind] == i: ind += 1 else: z -= 1 if z < 0: print ("No") sys.exit() if ind == len(B): print ("Yes") else: print ("No")