#include <bits/stdc++.h>
using namespace std;

#define f first
#define s second
#define pb push_back
#define rep(i, begin, end)                                                     \
  for (__typeof(end) i = (begin) - ((begin) > (end));                          \
       i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define db(x) cout << '>' << #x << ':' << x << endl;
#define sz(x) ((int)(x).size())
#define newl cout << "\n"

#define ll long long int
#define vi vector<int>
#define vll vector<long long>
#define vvll vector<vll>
#define pll pair<long long, long long>

#define fast_io()                                                              \
  ios_base::sync_with_stdio(false);                                            \
  cin.tie(NULL);                                                               \
  cout.tie(NULL);

ll tc, n, m, k;


int main() {
  fast_io();
#ifndef ONLINE_JUDGE
  freopen("../input.txt", "r", stdin);
  freopen("../output.txt", "w", stdout);
#endif

  cin>>n>>k;
  vll start(n), end(n), amount(n);
  rep(i, 0, n) cin>>start[i]>>end[i]>>amount[i];

  auto solve = [&]() {
    vector<pair<pair<int, int>, int>> events;
    rep(i, 0, n) {
      events.pb({{start[i], 1}, amount[i]});
      events.pb({{end[i], -1}, amount[i]});
    }
    sort(events.begin(), events.end());
    ll curr = 0;
    rep(i, 0, sz(events)) {
      auto id = events[i].f.s;
      if(id == 1) {
        curr += events[i].s;
      } else {
        curr -= events[i].s;
      }
      if(curr > k) return false;
    }

    return true;
  };

  if(solve()) {
    cout<<"Yes";
  } else {
    cout<<"No";
  }

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n);i++)
void out(string s){cout<<s<<endl;}
void outInt(int n){cout<<n<<endl;}
void outLl(long long ll){cout<<ll<<endl;}

int main(){
	int a,b,c;
  cin>>a>>b>>c;
  if(a*a+b*b < c*c){
  	out("Yes");
  }else{
  	out("No");
  }
}
