#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef double dd;
#define tst int tttt;cin>>tttt;for(int TTTT=1;TTTT<=tttt;TTTT++)
#define nl cout<<"\n";
#define forn(a,b) for(int ii=a;ii<b;ii++)
const ll MOD1=1e9+7;
const ll MOD2=998244353;
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define vi vector<int>
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define hhh cout<<"here"<<endl;

ll mod=MOD1;
ll po(ll x,ll y) {ll res=1;while(y>0){if(y&1)res=(res*x);x=(x*x);y>>=1;}return res;}
ll gcd(int a, int b){if(a<b) swap(a,b);if(b==0) return a;return gcd(a%b,b);}
int N=2e5+5;
void solve(){
    int n,w;cin>>n>>w;
    vector<ll> a(N);
    for(int i=0;i<n;i++){
        ll s,t,p;cin>>s>>t>>p;
        a[s]+=p;a[t]-=p;
    }ll s=0;
    for(int i=0;i<N;i++){
        s+=a[i];
        // cout<<s<<endl;
        if(s>w){
            cout<<"No";return;
        }
    }cout<<"Yes";
}
int main(){
    // fastio
    // ++*(int*)0;// crash
    // freopen("out.txt","r",stdin);freopen("outt.txt","w",stdout);
    // preprocess();
    // tst
    {
        solve();nl;
    }
}
/*

u & (v-u//2)

*/

//#include <tourist>
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
const int INF = 1e9;
const double eps = 1e-7;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
const long double pi = 4 * atan(1);
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v)          \
    cout << #v << ":";    \
    for (auto x : v)      \
    {                     \
        cout << x << ' '; \
    }                     \
    cout << endl;
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
//cout<<fixed<<setprecision(15);有効数字15桁
//-std=c++14
//g++ yarudake.cpp -std=c++17 -I .
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n,w;
    cin>>n>>w;
    vector<ll> sum(2*100000+2,0);
    ll s,t,p;
    rep(i,n){
        cin>>s>>t>>p;
        sum[s]+=p;
        sum[t]-=p;
    }
    rep(i,200001){
        sum[i+1]+=sum[i];
    }
    rep(i, 200000+2)
    {
        if(sum[i]>w){
            return no,0;
        }
    }
    yes;
}
