#include #include #include using namespace std; int sum(vector d){ int total = 0; for(int i = 0; i < d.size(); i++){ total += d[i]; } return total; } void solve() { int n,a; cin >> n >> a; vector d(n); for(auto &x : d) cin >> x; double ave = sum(d) / n; cout << (ave == a ? "YES" : "NO") << endl; } int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); solve(); return 0; }