#include<bits/stdc++.h>

using namespace std;

template<class T>
istream& operator >>(istream& is, vector<T>& v){
	for(auto&& elem:v)cin >> elem;
	return is;
}

template<class T>
ostream& operator <<(ostream& os, const vector<T>& v){
	if(!v.empty()){
		for(int i=0, size=v.size(); i<size-1; ++i)os << v[i] << " ";
		os<<v.back();
	}
	return os;
}

int main(){
	
	int n, w;
	cin >> n >> w;

	vector<long long> times(200010, 0);

	for(int i=0; i<n; ++i){
		int s, t, p;
		cin >> s >> t >> p;
		times[s]+=p;
		times[t]-=p;
	}

	for(int i=1, size= times.size(); i<size; ++i){
		times[i] += times[i-1];
	}

	for(auto&& t : times){
		if(t > w){
			cout <<"No"<<endl;
			fflush(stdout);
			return 0;
		}
	}

	cout <<"Yes"<<endl;
	fflush(stdout);
	return 0;
}
#include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <functional>
#include <bitset>
#include <limits>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <random>

#ifdef DEBUG
#include "library/Utility/debug.cpp"
#else
#define debug(...)
#endif

#define rep(i,n) for(int i=0;i<(n);++i)
#define EL '\n'
#define print(i) std::cout << (i) << '\n'
#define all(v) (v).begin(), (v).end()
using lnt = long long;
struct FIO{FIO(){std::cin.tie(0);std::ios_base::sync_with_stdio(0);std::cout<<std::fixed<<std::setprecision(15);}}fIO;
template<typename T> using V = std::vector<T>;
template<typename T> void fill(V<T>&v) { for(T&e:v) std::cin >> e; }
/*-*/

int main() {
	int n; lnt w;
	std::cin >> n >> w;
	V<lnt> cost((int)3e5,0);
	rep(i,n) {
		int s,t; lnt p;
		std::cin >> s >> t >> p;
		cost[s]+=p;
		cost[t]-=p;
	}
	rep(i,(int)3e5-4) {
		cost[i+1]+=cost[i];
		if(cost[i]>w) {
			print("No");
			return 0;
		}
	}
	print("Yes");
}
