#include #define int long long using namespace std; int n, a, x; signed main() { int ssum = 0; cin >> n >> a; for (int i = 0; i < n; i++) { cin >> x; ssum += x; } if (ssum % a != 0 || ssum / n != a) { cout << "NO" << endl; } else { cout << "YES" << endl; } return 0; }