a,b=[int(i) for i in input().split()] c=[int(i) for i in input().split()] d=0 for i in c: d+=i if d/a==b: print("YES") else: print("NO")