n = int(input()) A = list(map(int, input().split())) A.sort() z = 0 B = [] for a in A: if a == 0: z += 1 else: B.append(a) import math d = 0 B.sort() for i in range(len(B)-1): d = math.gcd(d, B[i+1]-B[i]) if d == 0: print('Yes') exit() cnt = 0 for i in range(len(B)-1): cnt += (B[i+1]-B[i])//d-1 if cnt <= z: print('Yes') else: print('No')