#include using namespace std; int main(){ long long n,k,x,sum=0; cin >> n >> k; k*=n; while(n--){ cin >> x; sum+=x; } cout << (k==sum?"YES":"NO") << endl; return 0; }