#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define all(x) x.begin(),x.end()
#define MOD 1000000007
#define PI acos(-1)
#define debug cerr <<
#define var(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
#define close << "\n";

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freopen("../input.txt","r",stdin);

	ll N,W;
	cin >> N >> W;
	vector<ll> arr((int)2e5+60,0);
	ll max_T = 0;
	for (ll i = 0; i < N; ++i) {
		ll S,T,P;
		cin >> S >> T >> P;
		T--;
		arr[S]+=P;
		arr[T+1]-=P;
		max_T = max(max_T,T);
	}
	for (ll i = 1; i < arr.size(); ++i) {
		arr[i] += arr[i-1];
	}
	bool possible = true;
	for (ll i = 0; i < arr.size(); ++i) {
		//cout << arr[i] << " ";
		if(arr[i] > W){
			possible = false;
			break;
		}
	}
	cout << ((possible)?"Yes":"No") close
}

#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<limits>
#include<set>
#include<deque>
#include<queue>
#include<stack>
using namespace std;
#define int long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define dup(x,y) (((x)+(y)-1)/(y))
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
typedef pair<int, int>P;
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const int INF = 1e18;
const long double PI = (acos(-1));


signed main() {
	int N, W;
	cin >> N >> W;
	vector<int>S(N), T(N), P(N);
	rep(i, N)cin >> S[i] >> T[i] >> P[i];
	int tmx = -INF;
	rep(i, N)chmax(tmx, T[i]);
	vector<int>v(tmx + 1, 0);
	rep(i, N) {
		v[S[i]] += P[i];
		v[T[i]] -= P[i];
	}
	rep(i, tmx) {
		v[i + 1] += v[i];
	}
	rep(i, tmx + 1) {
		if (v[i] > W) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
}