import sys import heapq, math, itertools from collections import defaultdict, deque from bisect import bisect_left, bisect_right, insort_left, insort_right inputs = sys.stdin.readline mod = 10**9+7 inf = float('inf') #sys.setrecursionlimit(10**7) def main(): n = int(input()) a = list(map(int, inputs().split())) cnt, x = 0, [] for aa in a: if aa==0: cnt += 1 else: x.append(aa) if not x: print('Yes') else: x = sorted(x) y = [] for i in range(1, len(x)): if x[i]-x[i-1]!=0: y.append(x[i]-x[i-1]) if not y: print("Yes") else: d = min(y) flg = True num = 0 for i in range(1, len(x)): dif = x[i]-x[i-1] if dif==0: if d!=0: flg = False elif dif%d!=0: flg = False else: num += max((dif//d)-1,0) if num>cnt: flg = False print('Yes' if flg else 'No') if __name__ == '__main__': main()