#include <bits/stdc++.h>
#define rep(begin, end) for (i=begin;i<end;i++)
#define repj(begin, end) for (j=begin;j<end;j++)
#define init(arr, end, val) for (i=0;i<end;i++) arr[i] = val;
#define printint(i0, i1) printf("%d %d\n", i0, i1)

using namespace std;
typedef long long int ll;
const int inf = 1000000000;
const int mod = 1000000007;
const int nil = -1;
ll i, j, n, w, s, t, p;
ll a[200001];
bool ans;

int main() {
    scanf(" %lld %lld", &n, &w);
    rep(0,n+1) a[i] = 0;
    rep(0,n) {
        scanf(" %lld %lld %lld", &s, &t, &p);
        a[s] += p; a[t] -= p;
    }
    ans = a[0] <= w;
    rep(1,n+1) {
        a[i] += a[i-1];
        if (a[i] > w) ans = false;
    }

    if (ans) printf("Yes");
    else printf("No");
}
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
//using namespace __gnu_pbds;
//template<class T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '['; string sep; for (const auto &x : v) os << sep << x, sep = ", "; return os << ']'; }
template<typename T, size_t size> ostream& operator<<(ostream &os, const array<T, size> &arr) { os << '{'; string sep; for (const auto &x : arr) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '{' << p.first << ", " << p.second << '}'; }
template<typename T> ostream& operator<<(ostream &os, const set<T> &s) { os << '{'; string sep; for (const auto &x : s) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream &os, const map<A, B> &mp) { os << '['; string sep; for (const auto &x : mp) os << sep << x, sep = ", "; return os << ']'; }
template<typename T> ostream& operator<<(ostream &os, const multiset<T> &s) { os << '{'; string sep; for (const auto &x : s) os << sep << x, sep = ", "; return os << '}'; }

void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }

#ifndef ONLINE_JUDGE
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "] =", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif

#define int                                         long long
#define setbits(x)                                  __builtin_popcountll(x)
#define mod                                         1000000007
#define inf                                         1e18
#define endl                                        '\n'
#define pb                                          push_back
#define all(x)                                      x.begin(),x.end()
#define ff                                          first
#define ss                                          second

int powmod(int a, int b) {int res = 1; a %= mod; for (; b; b >>= 1) {if (b & 1)res = res * a % mod; a = a * a % mod;} return res;}
int fast_pow(int a, int b) {if (b == 1) return a; if (b == 0) return 1; int x = fast_pow(a, b / 2); x *= x; if (b & 1) x *= a; return x;}

const int nax = 2e5 + 5;
vector<pair<int, int>> v(nax);
vector<int> timee(nax);
vector<int> ans(nax);
vector<pair<int, int>> marks(nax);
vector<pair<int, int>> pre(nax);
int n, t;

void solve()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cout << fixed << setprecision(10);
    /*#ifndef ONLINE_JUDGE
        freopen("inp.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif*/
    cin >> n >> t;
    for (int i = 0; i < n; i++) {
        cin >> v[i].ff >> v[i].ss >> timee[i];
    }

    for (int i = 0; i < n; i++) {
        marks[v[i].ff + 1].ff++;
        marks[v[i].ff + 1].ss += timee[i];
        marks[v[i].ss + 1].ff--;
        marks[v[i].ss + 1].ss -= timee[i];
        // dbg(marks);
    }

    pre[0].ff = marks[0].ff;
    pre[0].ss = marks[0].ss;

    for (int i = 1; i < nax; i++) {
        pre[i].ff = pre[i - 1].ff + marks[i].ff;
        pre[i].ss = pre[i - 1].ss + marks[i].ss;
    }
    // dbg(marks);
    // dbg(pre);
    bool c = 0;
    for (int i = 0; i < nax; i++) {
        if (pre[i].ss > t) {
            cout << "No"  << endl;
            return;
        }
    }
    cout << "Yes" << endl;
}

int32_t main()
{
    solve();
    return 0;
}


// 0 0 0  0  0  0 0 0 0 0 0
// 0 1 0 -1  0  0 0 0 0 0 0
// 0 1 1 -1 -1  0 0 0 0 0 0
// 0 1 1  0 -1  0 0 0 0 0 0 -1
// 0 1 2  0 -2  0 0 0 0 0 0 -1