#include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < n; i++)
#define rep2(i, s, n) for (int i = (s); i < n; i++)
#define sort(A) sort(A.begin(),A.end())
#define reverse(A) reverse(A.begin(),A.end());
#define vecint(A, n) vector<long long int> A(n);
#define vecint2(A, n, m) vector<vector<long long>> A(n, vector<long long>(m));
#define vecchar(A, n) vector<char> A(n);
#define vecchar2(A, n, m) vector<vector<char>> A(n, vector<char>(m));
#define vecstr(A, n) vector<string> A(n);
#define keta(s) cout << fixed << setprecision(s);
#define test cout<<"OK"<<endl; //test;
const double pi=3.14159265358979323846;
using namespace std;
long long MOD=1000000007; // %MOD
int main() {
  int N,W;
  cin>>N>>W;
  vecint(A,200005);
  rep(i,N){
    int S,T,P;
    cin>>S>>T>>P;
    A[S]+=P;
    A[T]-=P;
  }
  vecint(B,200005);
  B[0]=A[0];
  rep(i,200004){
    B[i+1]=B[i]+A[i+1];
  }
  sort(B);
  reverse(B);
  if(B[0]>W) cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
}
#include<bits/stdc++.h>

#define ll long long 

using namespace std;

int read()
{
	int a=0,f=1,c=getchar();
	while(!isdigit(c))
	{
		if(c=='-')f=-1;
		c=getchar();
	}
	while(isdigit(c))
	{
		a=a*10+c-'0';
		c=getchar();
	}
	return a*f;
}

const int K=1e5+10;

int k;
int n,m;
ll a[K],L[K],R[K];

bool check(ll d)
{
	ll sl=0,sr=0;
	for(int i=1;i<=k;++i)
	{
		L[i]=(max(a[i]*m-d,(ll)0)+n-1)/n;sl+=L[i];
		R[i]=(a[i]*m+d)/n;sr+=R[i];
	}
	
	if(sl<=m && m<=sr)
	{
		ll ext=m-sl;
		for(int i=1;i<=k;++i)
		{
			ll t=min(ext,(ll)R[i]-L[i]);
			L[i]+=t;ext-=t;
		}
		return 1;
	}
	else return 0;
}

int main()
{
//	freopen("1.in","r",stdin);
	
	k=read();
	n=read();m=read();
	for(int i=1;i<=k;++i)a[i]=read();
	
	ll l=0,r=1e18;
	while(l<r)
	{
		ll mid=(l+r)/2;
		if(check(mid))r=mid;
		else l=mid+1;
	}
	
	check(l);
	for(int i=1;i<=k;++i)printf("%lld ",L[i]);
	puts("");
	
	return 0;
}