#include <iostream>
#include <climits>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
 
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

#define MOD 1000000007LL

int N;
ll W;
map<ll, ll> st;

int main()
{
  ll si, ti, pi;
  ll ps;

  cin >> N >> W;
  for (int i=0; i<N; i++) {
    cin >> si >> ti >> pi;
    if (st.count(si) == 0) {
      st.emplace(si, pi);
    } else {
      ps = st[si]+pi;
      st[si] = ps;
    }
    if (st.count(ti) == 0) {
      st.emplace(ti, -pi);
    } else {
      ps = st[ti]-pi;
      st[ti] = ps;
    }
  }
  ll psum=0;

//for (auto it=st.begin(); it!= st.end(); it++) printf("%lld %lld\n", it->first, it->second);
//printf("\n");

  for (auto it=st.begin(); it!= st.end(); it++) {
    psum += it->second;
//printf("%lld %lld %lld\n", it->first, it->second, psum);
    if (psum > W) {
      printf("No\n");
      return 0;
    }
  }

  printf("Yes\n");
  return 0;
}

#include <bits/stdc++.h>
#define ll long long int
#define omar main
#define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//priority_queue push_back make_pair emplace vector double float unordered_map unordered_set queue stack sort begin resize clear second first continue break
using namespace std;
int omar(){ fastIO
	int n, s, d; cin >> n >> s >>d;
	vector<pair<int, int>>spells(n);
	bool answer = 0;
	for (int i = 0 ; i < n ; i++){
		cin >> spells[i].first >> spells[i].second;
		answer = answer || ((spells[i].first < s) && spells[i].second > d);
	}
	puts((answer? "Yes": "No"));
	return 0;
}
