#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ll n, a; cin >> n >> a; ll sum = 0; rep(i, 0, n) { ll input; cin >> input; sum += input; } if (sum == a * n) cout << "YES\n"; else cout << "NO\n"; }