#include using namespace std; int main() { long long N, K; cin >> N >> K; long long sum = 0; for(int i = 0; i < N; ++i) { long long x; cin >> x; sum += x; } if(sum == N*K) cout << "YES" << endl; else cout << "NO" << endl; }