n,a=map(int,input().split()) x=input().split() w=0 for i in x: w+=int(i) if w/n==a: print("YES") else: print("NO")