#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define REP(i,n) for(int i=0;i( \ ( std::ostringstream() << std::dec << x ) ).str() #define ALL(s) (s).begin(), (s).end() using namespace std; typedef long long unsigned int llu; typedef long long ll; int main (){ int n; long int a; while (cin >> n >> a){ long int sum = 0; REP(i,n){ long int x; cin >> x; sum += x; } if(a * n == sum) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }