#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    ll K,N,M; cin >> K >> N >> M;
    vector<ll> A(K),B(K);
    rep(i,K) cin >> A[i];
    rep(i,K) B[i] = M * A[i] / N;

    ll x = M;
    vector<pair<ll,ll>> v;
    rep(i,K) x -= B[i];
    rep(i,K) v.push_back({M * A[i] - N * B[i], i});
    sort(v.rbegin(), v.rend());

    rep(i,x) B[v[i].second] += 1;
    rep(i,K){
        if(i) cout << " ";
        cout << B[i];
    }cout << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define ALL(v) begin(v),end(v)
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
#define TO_STRING(VariableName) # VariableName
#define debug(x) cerr<<TO_STRING(x)<<" : "<<x<<" "<<endl;
void debugs() { cerr << endl; }
template <class T, class... Args>
void debugs(const T& x, const Args &... args) {
		cerr << x << " ";
		debugs(args...);
}
template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>& p) {
		ost << "{ " << p.first << ", " << p.second << " }";
	return ost;
}
template<class T>
ostream& operator<<(ostream& ost, const vector<T>& v) {
	ost << "{ ";
	for (int i = 0; i < v.size(); i++) {
		if (i)ost << ", ";
		ost << v[i];
	}
	ost << " }";
	return ost;
}
template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>& v) {
	ost << "{ ";
	for (auto p : v) {
		ost << "{ " << p.first << ", " << p.second << " }";
	}
	ost << " }";
	return ost;
}
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
//---------------------------------//

ll u[212345];

int main() {
	ll n, w;
	cin >> n >> w;
	ll mt = 0;
	rep(i,n){
		ll s, t, p;
		cin >> s >> t >> p;
		//s--;
		//t--;
		u[s]+=p;
		u[t]-=p;
		mt = max(mt,t);
	}
	rep(i,mt-1) u[i+1] += u[i];
	bool f = false;
	rep(i,mt) if (u[i] > w) f=true;
	(f) ? cout << "No" << endl : cout << "Yes" << endl;
	return 0;
}

