#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { int n; long long a; cin >> n >> a; long long s = 0; for ( int i = 0; i < n; i++ ) { long long x; cin >> x; s += x; } cout << ( s == a*n ? "YES" : "NO" ) << endl; return 0; }