#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; signed main() { int n, a; int x[10]; cin >> n >> a; int sum = 0; REP(i,n) { cin >> x[i]; sum += x[i]; } if (sum % n != 0) { cout << "NO" << endl; } else if (sum / n == a) { cout << "YES" << endl; } else { cout << "NO" << endl; } }