#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef pair P; typedef pair PL; int main() { int n; ll a, sum = 0; cin >> n >> a; REP(i,n){ ll x; cin >> x; sum += x; } if (sum == n * a){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }