n = int(input()) a = list(map(int,input().split())) a.sort() cnt = 0 idx = -1 sa = [0] same = set() flg = False for i in range(n): if idx ==-1 and a[i] != 0: idx = i same.add(a[i]) elif idx != -1: if a[i] in same: flg = True sa.append(a[i]-a[idx]) same.add(a[i]) else: cnt += 1 if flg: if len(set(a)) <= 2: print("Yes") else: print("No") else: import math gcd_ = 0 for i in range(1,len(sa)): gcd_ = math.gcd(gcd_,sa[i]-sa[i-1]) baf = 0 for i in range(1,len(sa)): baf += (sa[i] - sa[i-1])//gcd_ - 1 if baf <= cnt: print("Yes") else: print("No")