import math N = int(input()) A = list(map(int, input().split())) v = [] for i in A: if i != 0: v.append(i) v.sort() if len(v) == 0: print("Yes") elif v[0] == v[-1]: print("Yes") else: g = v[1] - v[0] for i in range(1, len(v)): g = math.gcd(g, v[i] - v[i - 1]) if g == 0: print("No") elif (v[-1] - v[0]) // g <= N - 1: print("Yes") else: print("No")