from math import gcd from functools import reduce n = int(input()) a = [*map(int, input().split())] a.sort() zeros = a.count(0) s = [*filter(lambda x: x > 0, a)] if len(s) == 0: print("Yes") exit() sabun = [y - x for x, y in zip(s, s[1:])] g = reduce(gcd, sabun) if g == 0: if all(x == 0 for x in sabun): print("Yes") else: print("No") exit() for x, y in zip(s, s[1:]): zeros -= (y - x) // g - 1 if zeros >= 0: print("Yes") else: print("No")