import math N = int(input()) A = list(map(int, input().split())) A.sort() cnt = 0 start = 0 sa = [] bad = set() bad_cnt = 0 for i in range(N): if A[i] == 0: cnt += 1 else: if start != 0: if A[i]-start > 0: sa.append(A[i]-start) else: bad.add(A[i]) bad_cnt += 1 start = A[i] if len(sa)==1: gcd = sa[0] elif len(sa)>1: gcd = math.gcd(gcd, sa[-1]) res = 0 if len(bad) > 1 or (len(bad)==1 and 1+bad_cnt+cnt= res: print('Yes') else: print('No')