/*

  AUTHOR:    nit1n
  CREATED:   15.11.2020 18:02:29

*/
#include<bits/stdc++.h>
#define int long long
using namespace std ;

const int N = 2e5 + 10 ; 
int a[N] ; 

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL) ;

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

	int cur = 0 ; 
	for(int i = 0 ; i < N; ++i){
		cur += a[i] ; 
		if(cur > w){
			cout << "No" ; 
			return 0 ; 
		}
	}
	cout << "Yes" ;
}

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using vi=vector<int>;
using vvi=vector<vector<int>>;
using ll = long long int;
#define ss string
#define mod 1000000007
#define pi 3.14159265358979
#define rep(i,s,n) for(int i=(s);i<(int)(n);i++)
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
#define all(v) v.begin(),v.end()
#define co(x) cout << (x) << endl
#define ci(x) cin >> (x)

int main(){
  int maxn=200010,n,w;cin>>n>>w;
  vector<ll> time(maxn);
  vector<ll> s(maxn),t(maxn);
  rep(i,0,n){
    int ts,tt,p;cin>>ts>>tt>>p;
    s[ts]+=p;t[tt]+=p;
  }
  rep(i,0,maxn-1){
    time[i+1]=time[i]+s[i]-t[i];
    if(time[i]>w){co("No");return 0;}
  }
  co("Yes");
}