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