def solve(A): from math import gcd E=[a for a in A if a!=0]; E_set=set(E) M=A.count(0) if len(E)!=len(E_set): return len(E_set)==1 E.sort() g=0 for i in range(len(E)-1): g=gcd(g,E[i+1]-E[i]) E_min=E[0]; E_max=E[-1] X=E_min for _ in range(M+1): while X in E_set: X+=g X+=g return X>E_max N=int(input()) A=list(map(int,input().split())) print("Yes" if solve(A) else "No")