import collections import math N = int(input()) A = list(map(int, input().split())) CA = collections.Counter(A) B = [] for a in A: if a!=0: B.append(a) B.sort() CB= collections.Counter(B) if len(CB)==1 or len(CA)==1: print('Yes') exit() temp = 0 for i in range(len(B)-1): if B[i+1]-B[i]==0: print('No') exit() temp = math.gcd(temp,B[i+1]-B[i]) v = B[0] while CA[0]>=0 and v