#include using namespace std; int main() { double n, a; vector v; cin >> n >> a; long long tmp; for (int i = 0; i < n; i++) { cin >> tmp; v.push_back(tmp); } long long sum = accumulate(v.begin(), v.end(), 0LL); double avg = sum / n; if (avg == a) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }