#include using namespace std; int main(){ int n, a, sum = 0; cin >> n >> a; for(int i = 0; i < n; i++){ int x; cin >> x; sum += x; } cout << (double(sum) / n == double(a) ? "YES" : "NO") << endl; }