#include <iostream>
#include <vector>
using namespace std;
using i64 = long long;

int main()
{
    i64 n, w;
    cin >> n >> w;
    vector<i64> imos(2 * 100000 + 1, 0ll);

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

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

    bool f = true;
    for (auto s : imos)
    {
        if (s > w)
            f = false;
    }

    if (f)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}
  /* Great things never come from comfort zones,
  "whatever the mind of a man can conceive and believe,it can achieve." */
   
  #include <bits/stdc++.h>
  using namespace std;

  #define ll long long
  #define dd double
  #define scf(n) scanf("%d",&n)
  #define lscf(n) scanf("%lld",&n)
  #define lpri(n) printf("%lld ",n)
  #define pri(n) printf("%d ",(int)n)
  #define prin(n) printf("%d\n",(int)n)
  #define lprin(n) printf("%lld\n",n)
  #define rep(i,ini,n) for(int i=ini;i<(int)n;i++)
  #define show(a) for(auto xy: a) pri(xy); printf("\n");

  #define pb push_back
  #define mp make_pair
  #define F first
  #define S second
  #define all(x)     x.begin(),x.end()
  #define tc   int tt; scf(tt); while(tt--)

  #define inf INT_MAX
  #define ninf INT_MIN
  #define gcd __gcd
  #define bitcount(n) __builtin_popcount(n)

  const ll mod=1e9+7;
  const int N = 1e6+7;
      

  void my_dbg() { cout << endl; }
  template<typename Arg, typename... Args> void my_dbg(Arg A, Args... B) 
  { cout << ' ' << A; my_dbg(B...); }
  #define dbg(...) cout << "(" << #__VA_ARGS__ << "):", my_dbg(__VA_ARGS__)

  ll x[N];

  int main()
  {
         int n,w;
         scf(n),scf(w);


         rep(i,0,n)
         {
            int a,b;
            scf(a),scf(b);

            int p ; scf(p);

            x[a]+=p;

            x[b]+=(-p);

          }

          rep(i,1,n)
          x[i]+=x[i-1];

          bool f=1;

          rep(i,0,n)
          if(x[i]>w)f=0;

          if(f)
          printf("Yes\n");

          else
          printf("No\n");
  }


       // printf("NO\n");
       
       //  printf("YES\n");



    





