#include<bits/stdc++.h>
using namespace std;
const int N=1E5+5;
typedef long long ll;
int n,m;
ll a[N],ans[N];
struct hzy{int id;long long x;}q[N];
bool mycmp(hzy a,hzy b){return a.x<b.x;}
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++){
		scanf("%lld",&a[i]);
	}
	for(int i=1;i<=m;i++){
		scanf("%lld",&q[i].x);
		q[i].id=i;
	}
	sort(q+1,q+m+1,mycmp);
	int t=0;
	for(int i=1;i<=m;i++){
		q[i].x+=t;
		while(t<n&&q[i].x>=a[t+1]){
			t++;
			q[i].x++;
		}
		ans[q[i].id]=q[i].x;
	}
	for(int i=1;i<=m;i++)printf("%lld\n",ans[i]);
}
#include<bits/stdc++.h>
using namespace std;

#define FASTIO	ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define ll long long 
#define mset(A,val) memset(A,val,sizeof(A))
#define fi(a,b) for(int i=a;i<=b;++i)
#define fj(a,b) for(int j=a;j<=b;++j)
#define all(x) x.begin(),x.end()
#define vi vector<int>
#define pii pair<int,int>
#define int long long

// ---------------------------------------------------------------------------
const int mod = 1e9+7;
const int maxn = 2e5 + 9;

// ---------------------------------------------------------------------------

// ---------------------------------------------------------------------------
void test_case(int tc)
{
	// cout<<"Case #"<<tc<<": ";
	int n,w;cin>>n>>w;
    int hash[maxn+100];
    mset(hash,0);
    fi(1,n){
        int l,r,c;cin>>l>>r>>c;
        l++,r++;
        hash[r]-=c;
        hash[l]+=c;
    }

    fi(1,n+9){
        hash[i]+=hash[i-1];
        if(hash[i]>w){
            cout<<"No";
            return;
        }
    }
    cout<<"Yes";
}

int32_t main()
{
	FASTIO;
	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif
	
	int t=1;
	//cin>>t;
	for(int tc=1;tc<=t;++tc)test_case(tc);
}