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