#include <iostream>
#include <string>
#include <vector>
#include <map>
#define REP(i, n) for (int i = 0; (i) < (int)(n); ++ (i))
#define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++ (i))
#define REP_R(i, n) for (int i = (int)(n) - 1; (i) >= 0; -- (i))
#define REP3R(i, m, n) for (int i = (int)(n) - 1; (i) >= (int)(m); -- (i))
#define ALL(x) ::std::begin(x), ::std::end(x)
using namespace std;

const string YES = "Yes";
const string NO = "No";
bool solve(int N, int64_t W, const vector<int64_t> & S, const vector<int64_t> & T, const vector<int64_t> & P) {
    map<int, int64_t> m;
    REP(i, N)
    {
        m[S[i]] += P[i];
        m[T[i]] -= P[i];
    }
    int64_t x = 0;
    for(auto &a: m){
        x += a.second;
        // cerr << a.first << " " << x << endl;
        if(W < x) return 0;
    }
    return 1;
}

// generated by online-judge-template-generator v4.7.1 (https://github.com/online-judge-tools/template-generator)
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    constexpr char endl = '\n';
    int64_t N;
    int64_t W;
    cin >> N;
    vector<int64_t> S(N), T(N), P(N);
    cin >> W;
    REP (i, N) {
        cin >> S[i] >> T[i] >> P[i];
    }
    auto ans = solve(N, W, S, T, P);
    cout << (ans ? YES : NO) << endl;
    return 0;
}

#include <bits/stdc++.h>
#define ll long long

using namespace std;
vector<int> A;

const int MAX = 200010;
int main()
{
	ll N,W;
	cin >> N >> W;
	vector<ll> num(MAX + 1, 0);
	for(int i = 0; i < N; i++)
	{
		ll s,t,w;
		cin >> s >> t >> w;
		num[s] += w;
		num[t] -= w;
	}
	for(int i = 0; i < MAX; i++)
	{
		num[i + 1] += num[i];
		if (num[i] > W)
		{
			cout << "No" << endl;
			return (0);
		}
	}
	cout << "Yes" << endl;
}