#include<bits/stdc++.h>
using namespace std;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll  = vector<vll>;

int main()
{
    int n;
    ll w;
    cin >> n >> w;
    vll need(200000,0ll);
    for (int i = 0; i < n; i++)
    {
        int s,t;
        cin >> s >> t;
        ll p;
        cin >> p;
        need[s] += p;
        need[t] -= p;
    }
    for (int i = 1; i < n; i++)
    {
        need[i] += need[i-1];
    }
    string ans = "Yes";
    for (int i = 0; i < n; i++)
    {
        if (need[i] > w)
        {
            ans = "No";
        }
    }
    cout << ans << endl;
}
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__)
//mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define fir first
#define sec second
#define mod 998244353
#define int long long
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f3f
inline int read()
{
	char ch=getchar(); int nega=1; while(!isdigit(ch)) {if(ch=='-') nega=-1; ch=getchar();}
	int ans=0; while(isdigit(ch)) {ans=ans*10+ch-48;ch=getchar();}
	if(nega==-1) return -ans;
	return ans;
}
typedef pair<int,int> pii;
void print(vector<int> x){for(int i=0;i<(int)x.size();i++) printf("%d%c",x[i]," \n"[i==(int)x.size()-1]);}
#define N 400005
int s[N],t[N],w[N],n,m,r[N];
int sum[N];
signed main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++) s[i]=read(),t[i]=read(),w[i]=read();
	int cnt=0;
	for(int i=1;i<=n;i++) r[++cnt]=s[i],r[++cnt]=t[i];
	sort(r+1,r+cnt+1); int Q=unique(r+1,r+cnt+1)-r-1;
	for(int i=1;i<=n;i++) s[i]=lower_bound(r+1,r+Q+1,s[i])-r;
	for(int i=1;i<=n;i++) t[i]=lower_bound(r+1,r+Q+1,t[i])-r;
	for(int i=1;i<=n;i++) sum[s[i]]+=w[i],sum[t[i]]-=w[i];
	int maxn=0;
	for(int i=1;i<=Q;i++) sum[i]+=sum[i-1];
	for(int i=1;i<=Q;i++) maxn=max(maxn,sum[i]);
	if(maxn<=m) cout<<"Yes\n";
	else cout<<"No\n";
	return 0;
}


