N, a, *X = map(int, open(0).read().split()) if sum(X) == a * N: print("YES") else: print("NO")