n,a=map(int,input().split()) sum=sum(map(int,input().split())) if sum%n==0 and sum/n==a:print("YES") else:print("NO")