#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll MOD = 1000000007;
int main() {
  ll N, W;
  cin >> N >> W;
  vector<ll> imos(2 * 1e5 + 1000);
  REP(i, N) {
    int s, t, p;
    cin >> s >> t >> p;
    imos[s] += p, imos[t] -= p;
  }
  REP(i, 2 * 1e5 + 100) { imos[i + 1] += imos[i]; }
  REP(i, 2 * 1e5 + 100) {
    if (imos[i] > W) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
  int N, W;
  cin >> N >> W;
  vector<int> S(N), T(N);
  vector<ll> P(N);
  vector<ll> voldif(200001);
  for (int i = 0; i < N; i++) {
    int s, t, p;
    cin >> s >> t >> p;
    voldif[s] += p;
    voldif[t] -= p;
  }
  string ans = "Yes";
  ll vol = 0;
  for (auto &x : voldif) {
    vol += x;
    if (vol > W) ans = "No";
  }
  
  cout << ans << endl;
}


