n = int(input()) lis = list(map(int,input().split())) lis2 = [] zero_cnt = 0 for i in range(n): if(lis[i] != 0): lis2.append(lis[i]) else: zero_cnt += 1 lis2.sort() diff = [] for i in range(len(lis2)-1): diff.append(lis2[i+1] - lis2[i]) diff.sort() if(diff[0] != 0): cnt = 0 for i in range(1,len(diff)): if(diff[i] % diff[0] != 0): print('No') exit(0) else: cnt += diff[i] // diff[0] - 1 if(zero_cnt >= cnt): print('Yes') else: print('No') else: if(diff[-1] == 0): print('Yes') else: print('No')