n, a = map(int, input().split()) ans = "YES" if sum([int(i) for i in input().split()]) / n == a else "NO" print(ans)