from math import gcd N=int(input()) A=list(map(int,input().split())) ZERO=0 B=[] for a in A: if a==0: ZERO+=1 else: B.append(a) B.sort() if len(set(B))<=1: print("Yes") exit() if len(set(B))!=len(B): print("No") exit() GCD=0 for i in range(1,len(B)): GCD=gcd(GCD,B[i]-B[i-1]) MIN=B[0] MAX=B[-1] k=(MAX-MIN)//GCD+1 if k-len(B)<=ZERO: print("Yes") else: print("No")