#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i,a, n) for(int (i) = (a); (i) < (n); (i)++)
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T> void chmax(T& a, T b){ if(a<b){a=b;} }
template<class T> void chmin(T& a, T b){ if(a>b){a=b;} }
 
ll getDevisor(ll num) { //約数の総和
  ll ans = 0;
  for (ll i = 1; i <= num; i++) {
    if (num % i == 0)
      ans++;
  }
  return ans;
}
 
ll digit_sum(ll n) { //各桁の和
  if (n < 10)
    return n;
  return digit_sum(n / 10) + n % 10;
}
ll calc_digit(ll N) { //桁数
  int res = 0;
  while (N) {
    ++res;
    N /= 10;
  }
  return res;
}
const long long mod = 1e9 + 7;
int main() {
	  ll c;
    int n, w;
    cin >> n >> w;
 
    vector <ll> p(200002);
 
    for(int i = 0; i < n; i++)
    {
        int s, t;
        cin >> s >> t;
 
        ll x;
        cin >> x;
 
        p[s] += x;
        p[t] -= x;
    }
 
    for(int i = 1; i < 200002; i++)
    {
        p[i] += p[i-1];
    }

    c=*max_element(all(p));
 
    cout << ((c<=w)? "Yes":"No");
 
}
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);++i)
using namespace std;
using ll=long long;

int main(){ 
 int n,w; cin>>n>>w;
 vector<ll> p(300000,0);
 rep(i,n){
  int a,b,c; cin>>a>>b>>c;
  p[a]+=c;
  p[b]-=c;
 }
 ll count=0;
 rep(i,300000){
  count+=p[i];
  if(count>w){
   cout<<"No"<<endl;
   return 0;
  } 
 }
 cout<<"Yes"<<endl;
 return 0;
}