import sys n = int(input()) a = list(map(int,input().split())) a_plus = [] zero_count = 0 for _ in a: if _ != 0: a_plus.append(_) else: zero_count += 1 a_plus.sort() a_dfr = [a_plus[i+1]-a_plus[i] for i in range(len(a_plus)-1)] min_dfr = min(a_dfr) if min_dfr == 0 and (1 in set(a_plus)) and len(set(a_plus))==1: print("Yes") sys.exit() mlt_count = 0 for j in a_dfr: if j%min_dfr==0: mlt_count += (j//min_dfr)-1 else: print("No") sys.exit() if mlt_count <= zero_count: print("Yes") else: print("No")