#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <iterator>
#include <cmath>
#include <set>
#include <deque> 
#include <string>


using namespace std;

struct Request {
	int s;
	int t;
	int p;
};

struct Point {
	int time;
	long long cost;
	int upOrDown;	//1--up, -1--down	
	
    bool operator < (const Point &a) const {
        return this->time>a.time;//最小值优先
    }	
};

int n;
int w;
Request r[200010];

int main()
{
	std::priority_queue<Point> q;
	
	
	scanf("%d%d", &n, &w);
	for (int i = 0 ; i < n ; i++) {
		scanf("%d%d%d", &(r[i].s), &(r[i].t), &(r[i].p));
		
		Point ptA;
		ptA.time = r[i].s;
		ptA.cost = r[i].p;
		ptA.upOrDown = 1;
		
		q.push(ptA);
		
		ptA.time = r[i].t;
		ptA.cost = r[i].p;
		ptA.upOrDown = -1;
		q.push(ptA);
	}
	
	long long curCost = 0;
	while (q.empty() == false) {
		Point curP = q.top();
		q.pop();
		int curTime = curP.time;
		
		if (curP.upOrDown == 1) {
			curCost = curCost + curP.cost;
		} else {
			curCost = curCost - curP.cost;
		}
		
		if (q.empty())
			break;
			
		curP = q.top();
		while (curP.time == curTime) {
			if (curP.upOrDown == 1) {
				curCost = curCost + curP.cost;
			} else {
				curCost = curCost - curP.cost;
			}			
			q.pop();
			if (q.empty())
				break;
			curP = q.top();
		}
		
		if (curCost > w) {
			printf("No\n");
			return 0;
		}
	}
	
	printf("Yes\n");
	
	
	return 0;
}

#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>

struct Row
{
  long start;
  long end;
  long p;

  bool operator<(const Row& rhs) const
  {
    return end < rhs.end;
  }
};

std::string solve(long n, long w, std::vector<Row>& rows)
{
  std::sort(rows.begin(), rows.end(),
      [](const Row& lhs, const Row& rhs) { return lhs.start < rhs.start; });

  long sum = 0;
  std::multiset<Row> olds;
  for (auto& r : rows) {
    sum += r.p;
    for (auto it = olds.begin(); it != olds.end(); ++it) {
      if (it->end <= r.start) {
        sum -= it->p;
      } else {
        olds.erase(olds.begin(), it);
        break;
      }
    }
    if (sum > w) return "No";
    olds.insert(r);
  }
  return "Yes";
}

int main()
{
  long n, w;
  std::cin >> n >> w;

  std::vector<Row> rows(n);
  for (auto& r : rows) {
    std::cin >> r.start >> r.end >> r.p;
  }

  std::cout << std::setprecision(20);
  std::cout << solve(n, w, rows) << std::endl;
}
