#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main(){ ll n,a; cin >> n >> a; ll sum = 0; for(int i = 0;i < n;i++){ ll in; cin >> in; sum += in; } if(n * a == sum)cout << "YES" << endl; else cout << "NO" << endl; }