#include <bits/stdc++.h>

using namespace std;

int main() 
{
 ios_base::sync_with_stdio(0);
 cin.tie(0);
 int n;
 cin >> n;
 long long w;
 cin >> w;
 const int maxa = 2e5 + 1;
 vector<long long> c (maxa, 0);
 while (n--) {
  long long s, t, p;
  cin >> s >> t >> p;
  c[s] += p;
  c[t] -= p;
 }
 long long sum = 0;
 for (int i = 0; i < maxa; i++) {
  sum += c[i];
  if (sum > w) {
   cout << "No" << '\n';
   return 0;
  }
 }
 cout << "Yes" << '\n';
 return 0;
}

//                               //
    //    author :  S4M4R    //
    // 14:51:47 | 13-10-2020 //
//                               //
 
#include <vector>
#include <iostream>
#include <algorithm>
 
using namespace std;
 
void IN()
{
    // cin.tie(nullptr)->sync_with_stdio(false);
 
    #ifndef ONLINE_JUDGE 
        freopen("input.txt", "r", stdin); 
        freopen("output.txt", "w", stdout); 
    #endif
}
 
void solve()
{
    vector <long long> v(4);
    for (auto & a : v) cin >> a;
    sort(v.begin(), v.end());
    long long a(v[0]), b(v[1]), c(v[2]), d(v[3]);
    if (a+b == c+d || a+b+c == d || a+d == b+c) {
        cout << "Yes" << '\n'; return;
    }
    cout << "No" << '\n';
}
 
int32_t main()
{
    IN();
    int t(1); //cin >> t; 
    while(t--) solve(); return 0;
}