/**
*    author:  
*    created: 15.11.2020 22:52:52
**/

#pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using P = pair<int,int>;
using ll = long long;
const int INF = 1001001001;
const int di[] = {-1,0,1,0}, dj[] = {0,-1,0,1};
typedef vector<int> vi;
typedef vector<vi> vvi;

#define rep(i,n) for(int i = 0; i < (n); i++)
#define repn(i,n) for(int i = 1; i <= (n); i++)
#define pb push_back
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << H << " ";
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

template<class T>
inline bool chmax(T &a, T b) {
  if(a < b) {
    a = b;
    return true;
  }
  return false;
}
template<class T>
inline bool chmin(T &a, T b) {
  if(a > b) {
    a = b;
    return true;
  }
  return false;
}

const double PI = acos(-1);
const int mod = 1000000007;
class mint {
  long long x;
  public:
  mint(long long x=0) : x((x%mod+mod)%mod) {}
  mint operator-() const {
    return mint(-x);
  }
  mint& operator+=(const mint& a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint& a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const  mint& a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint& a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint& a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint& a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    return a;
  }
  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint& a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint& a) const {
    mint res(*this);
    return res/=a;
  }

  friend ostream& operator<<(ostream& os, const mint& m){
    os << m.x;
    return os;
  }
};
#pragma endregion

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n,w;
  cin >> n >> w;
  vector<ll>weight(200010,0);
  rep(i,n){
    int s,t,w;
    cin >> s >> t >> w;
    weight[s]+=w;
    weight[t]-=w;
  }
  rep(i,200005){
    weight[i+1]+=weight[i];
    if(weight[i]>w){
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
#include <iostream>

#include <vector>
#include <string>

#include <algorithm>
#include<cmath>
#define ll long long

using namespace std;

int main(void){
  ll num,pro;
  cin >> num;
  cin >> pro;
  bool ans = true;
  vector<ll> start(num);
  vector<ll> end(num);
  vector<ll> use(num);
  for(int i = 0;i < num;i ++){
    cin >> start[i];
    cin >> end[i];
    cin >> use[i];
  }
  vector<ll> add(300000,0);
  for(int i = 0;i < num;i ++){
    add[start[i]] = add[start[i]] + use[i];
    add[end[i]] = add[end[i]] - use[i];
  }
  ll sum = 0;
  for(int i = 0;i < 300000;i ++){
    sum = sum + add[i];
    if(sum > pro){
      ans = false;
    }
  }
  if(ans == true){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }

  return 0;
}