n, a = map(int, input().strip().split(" ")) x = sum([int(i) for i in input().strip().split(" ")]) if x == a * n: print("YES") else: print("NO")