n,a=map(int,input().split()) if sum(list(map(int,input().split())))==a*n: print("YES") else: print("NO")