#include<iostream>

using namespace std;

typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

const int maxT=2*100010;


int main(){
    int N,W;
    cin >> N >> W;
    int S[N], T[N], P[N];
    ll as[maxT];
    rep(i,maxT) as[i]=0;
    rep(i,N){
        cin >> S[i] >> T[i] >> P[i];
        as[S[i]] += P[i];
        as[T[i]] -= P[i];
    }

    ll sum[maxT];
    rep(i,maxT) sum[i]=0;
    sum[0]=0;
    for(int i=0;i<=2*100000;i++){
        sum[i+1] = sum[i] + as[i];
    }
    ll m=0;
    rep(i,2*100000+2){
        m = max(m, sum[i]);
    }
    if(m<=W) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll n,w;
ll arr[200005];
int main() {
	cin >> n >> w;
	for(int i=0; i<n; i++){
		ll s,t,p;
		cin >> s >> t >> p;
		arr[s] += p;
		arr[t]-=p;
	}
	ll sum=0;
	bool flag=1;
	for(int i=0; i<n; i++){
		sum+=arr[i];
		if(sum>w){
			flag=0;
			break;
		}
	}
	if(flag==1) cout << "Yes";
	else cout << "No";
	return 0;
}