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