from math import gcd n = int(input()) a = [] k = 0 for x in map(int, input().split()): if x == 0: k += 1 else: a.append(x) a = sorted(a) ls = len(set(a)) n = len(a) if ls == 1: print('Yes') exit() elif ls != n: print('No') exit() g = 0 for x, y in zip(a, a[1:]): g = gcd(g, y - x) r = sum((y - x) // g - 1 for x, y in zip(a, a[1:])) print('Yes' if r <= k else 'No')