a,b=map(int,input().split()) l=list(input().split()) print("YES" if sum(int(i) for i in l)/a == b else "NO")