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