#include #define mp make_pair #define pb push_back #define REP(i,a,n) for(int i = a;i < (n);i++) #define rep(i,n) for(int i = 0;i < (n);i++) #define all(s) s.begin(), s.end() #define rall(s) s.rbegin(), s.rend() #define range(x,min,max) ((min) <= (x) && (x) <= (max)) #define xyrange(x, minX, maxX, y, minY, maxY) (range(x, minX, maxX) && range(y, minY, maxY)) using namespace std; typedef long long LL; typedef vector VI; typedef vector > VVI; typedef vector VS; typedef vector VB; typedef pair PII; typedef vector VPII; const int DX[]={1,0,-1,0},DY[]={0,-1,0,1}; const int INF = 0x3f3f3f3f; int n, a; VI xs; int main(){ cin.tie(0); ios::sync_with_stdio(false); cin >> n >> a; rep (i, n) { int x; cin >> x; xs.pb(x); } LL sum = accumulate(all(xs), 0LL); cout << (sum / (double)n == (double)a? "YES" : "NO") << endl; return 0; }