#wrong average n,a=(i for i in input().split()) n=int(n) a=float(a) x=[int(i) for i in input ().split()] S=0 for i in range(n): S+=x[i] if a ==S//n: print("YES") else: print("NO")