#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

string solve(ll n, ll w, vector<ll> s, vector<ll> t, vector<ll> p) {
    vector<ll> a(2 * pow(10, 5) + 1, 0);

    for(ll i = 0; i < n; i++) {
        a[s[i]] += p[i];
        a[t[i]] -= p[i];
    }
    if(a[0] > w) {
        return "No";
    }
    for(ll i = 1; i < (ll)a.size(); i++) {
        a[i] += a[i - 1];
        if(a[i] > w) {
            return "No";
        }
    }

    return "Yes";
}

int main() {
    ll n, w;
    cin >> n >> w;
    vector<ll> s(n), t(n), p(n);
    for(ll i = 0; i < n; i++) {
        cin >> s[i] >> t[i] >> p[i];
    }
    cout << solve(n, w, s, t, p);
}
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int, int> pii;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;

inline bool valid(int x, int n) {
    return 0 <= x && x < n;
}

int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};

template <typename T>
inline T pop(queue<T>& q) {
    T front = q.front();
    q.pop();
    return front;
}

template <typename T>
inline T gcd(T a, T b) {
    for (; b; a %= b, swap(a, b));
    return a; 
}

template <typename T>
tuple<T, T, T> xgcd(T a, T b) {
    if (b == 0) return {1, 0, a};
    T x, y, g;
    tie(x, y, g) = xgcd(b, a%b);
    return {y, x-(a/b)*y, g};
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    ll N, W; cin >> N >> W;
    vvi query(N*2);
    for (int i = 0; i < N; i++) {
        int S, T, P; cin >> S >> T >> P;
        query[i*2] = vi{S, P};
        query[i*2+1] = vi{T, -P};
    }
    sort(query.begin(), query.end());

    ll sub = 0;
    for (int i = 0; i < N*2; i++) {
        sub += query[i][1];
        if (sub > W) {
            cout << "No";
            return 0;
        }
    }
    cout << "Yes";
}