#include <bits/stdc++.h>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define wuyt main
typedef unsigned long long ll;
#define HEAP(...) priority_queue<__VA_ARGS__ >
#define heap(...) priority_queue<__VA_ARGS__,vector<__VA_ARGS__ >,greater<__VA_ARGS__ > >
template<class T> inline T min(T &x,const T &y){return x>y?y:x;}
template<class T> inline T max(T &x,const T &y){return x<y?y:x;}
ll read(){ll c = getchar(),Nig = 1,x = 0;while(!isdigit(c) && c!='-')c = getchar();
    if(c == '-')Nig = -1,c = getchar();
    while(isdigit(c))x = ((x<<1) + (x<<3)) + (c^'0'),c = getchar();
    return Nig*x;}
#define read read()
const ll inf = 1e15;
const ll INF = 0x3f3f3f3f;
const int maxn = 2e5 + 7;
const int mod = 998244353;
#define start int wuyt()
///#define end return 0
typedef int itn;
#define pi 3.14159265358979323846
ll gcd(ll a,ll b)
{
    ll t;
    while(b!=0)
    {
        t=a%b; a=b; b=t;
    }
    return a;
}
ll qPow(ll x, ll k)
{
    ll res = 1;
    while(k) {
        if(k&1) res=(res*x);
        k>>=1; x=(x*x);
    }
    return res;
}
ll maxx=-inf;
ll minn=inf;
ll res,ans,sum;
///int n,m;
map <string ,ll> mp;
priority_queue <int ,vector<int> ,greater<int> > xiaogen;
priority_queue <int ,vector<int> ,less<int> > dagen;
int n,k;
ll a[maxn];
int main()
{
    n=read,k=read;
    for(int i=1;i<=n;i++){
        int x=read,y=read,kk=read;
        a[x+1] += kk;
        a[y+1] -= kk;
    }
    int flag = 0;
    for(int i=1;i<=n;i++){
        a[i] += a[i-1];
        if(a[i] > k){
            flag = 1;
            ///cout<<i<<endl;
            break;
        }
    }
    if(flag) puts("No");
    else puts("Yes");
    return 0;
}
/**
4 10
1 3 5
2 4 4
3 10 6
2 3 1

**/

#include<bits/stdc++.h>

using namespace std;

template<class T>
istream& operator >>(istream& is, vector<T>& v){
	for(auto&& elem:v)cin >> elem;
	return is;
}

template<class T>
ostream& operator <<(ostream& os, const vector<T>& v){
	if(!v.empty()){
		for(int i=0, size=v.size(); i<size-1; ++i)os << v[i] << " ";
		os<<v.back();
	}
	return os;
}

int main(){
	
	int n, w;
	cin >> n >> w;

	vector<long long> times(200010, 0);

	for(int i=0; i<n; ++i){
		int s, t, p;
		cin >> s >> t >> p;
		times[s]+=p;
		times[t]-=p;
	}

	for(int i=1, size= times.size(); i<size; ++i){
		times[i] += times[i-1];
	}

	for(auto&& t : times){
		if(t > w){
			cout <<"No"<<endl;
			fflush(stdout);
			return 0;
		}
	}

	cout <<"Yes"<<endl;
	fflush(stdout);
	return 0;
}