from math import gcd def main(): N = int(input()) A = list(map(int, input().split())) zero = 0 B = [] for a in A: if a == 0: zero += 1 else: B.append(a) if len(set(B)) == 1: return True if len(set(B)) != len(B): return False B.sort() C = [] for i in range(1, len(B)): C.append(B[i] - B[i-1]) g = 0 for c in C: g = gcd(g, c) cnt = 0 for c in C: cnt += (c - 1) // g return zero >= cnt if main(): print("Yes") else: print("No")