#include //#include //using namespace boost::multiprecision; using namespace std; using ll = int64_t; using pii = pair; #define rep(i,n) for(int i=0; i<(int)n; i++) #define llrep(i,n) for(ll i=0; i<(ll)n; i++) #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてから使う #define INF 2147483647 #define LLINF 9223372036854775807LL #define fi first #define se second #define kiriage(x,y) (((x)+(y)-1)/(y)) typedef vector vi; typedef vector vll; int main(){ ll n,a; cin>>n>>a; ll sum = 0; rep(i,n){ ll x; cin>>x; sum += x; } cout << (sum==a*n? "YES":"NO") << endl; }