//Bismillahirrahmanirrahim

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>

using namespace std;

typedef long long lo; 
typedef pair< lo,lo > PII;

#define fi first
#define se second
#define int long long
#define mp make_pair
#define endl "\n"
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)

const lo inf = 1000000000000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 500005;
const lo mod = 1000000007;

int n,m,b[li],a[li],k,flag,t,PS[li];
int cev;
string s;
vector<int> v;

int32_t main(void){
	scanf("%lld %lld",&n,&m);
	FOR{
		int x,y,z;
		scanf("%lld %lld %lld",&x,&y,&z);
		PS[x]+=z;
		PS[y]-=z;
	}
	cev=PS[0];
	for(int i=1;i<=n;i++){
		PS[i]+=PS[i-1];
		cev=max(cev,PS[i]);
		//~ cout<<cev<<endl;
	}
	if(cev>m){printf("No\n");}
	else printf("Yes\n");
	return 0;
}



#include<map>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
	int n,w;
	cin >> n >> w;
	vector<pair<int,int>>event;
	for(int i=0;i<n;i++){
		int s,t,p;
		cin >> s >> t >> p;
		event.push_back(make_pair(s,p));
		event.push_back(make_pair(t,-p));
	}
	sort(event.begin(), event.end());
	long long crr=0;
	for(auto [time,value]:event){
		crr+=value;
		if(crr>w){
			cout << "No";
			return 0;
		}
	}
	cout << "Yes";
}