#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <cstdio>
#include <limits>
#define rep(i,n) for(int i = 0; i < n; ++i)
#define rep1(i,n) for(int i = 1; i <= n; ++i)
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if(a > b){ a = b; return 1; } return 0; }
template<class T> inline int  sz(T &a) { return a.size(); }
using ll = long long; using ld = long double;
using pi = pair<int,int>; using pl = pair<ll,ll>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
const int inf = numeric_limits<int>::max();
const ll infll = numeric_limits<ll>::max();
int main()
{
  int n; cin >> n;
  ll x; cin >> x;
  vl a(n);
  rep(i,n) cin >> a[i];

  map<pair<ll,int>,ll> dp;
  auto rec = [&](auto self, ll d, int i)->ll {
    if(i == n - 1) return dp[{d, i}] = ll(1);
    if(dp.find({d, i}) != dp.end() ) return dp[{d, i}];
    if(d % a[i+1] == 0) {
      return dp[{d, i}] = self(self, d, i+1);
    }
    else {
      ll res = self(self, d - d%a[i+1], i+1) + self(self, d + a[i+1] - d%a[i+1], i+1);
      return dp[{d, i}] = res;
    }
  };

  cout << rec(rec, x, 0) << "\n";
  
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;
using vvint = vector<vint>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vchar = vector<char>;
using vvchar = vector<vchar>;
using vp = vector<P>;
using vpp = vector<pair<P, P>>;
using vvp = vector<vp>;

#define rep(i, n) for (int i = 0; i < n; ++i)
#pragma region Debug
istream &operator>>(istream &is, P &a)
{
    return is >> a.first >> a.second;
}
ostream &operator<<(ostream &os, const P &a) { return os << "(" << a.first << "," << a.second << ")"; }

template <typename T>

void view(const std::vector<T> &v)
{
#ifndef ONLINE_JUDGE
    for (const auto &e : v)
    {
        std::cout << e << " ";
    }
    std::cout << std::endl;
#endif
}
template <typename T>
void view(const std::vector<std::vector<T>> &vv)
{
    for (const auto &v : vv)
    {
        view(v);
    }
}
#pragma endregion

const int TIME = 2 * 1e5;
int main()
{
    int n, w;
    cin >> n >> w;
    vll u(TIME + 5, 0);
    int tmax = 0;
    rep(i, n)
    {
        int s, t, p;
        cin >> s >> t >> p;
        u[s] += p;
        u[t] -= p;
        tmax = max(tmax, t);
    }

    // rep(i, tmax) cout << u[i] << " ";
    // cout << endl;

    vll use(TIME + 1, 0);
    rep(i, tmax) use[i + 1] = use[i] + u[i];

    // rep(i, tmax) cout << use[i] << " ";
    // cout << endl;

    bool ok = true;
    rep(i, tmax + 1)
    {
        ok = use[i + 1] <= w;
        if (!ok)
            break;
    }

    cout << (ok ? "Yes" : "No") << endl;

    return 0;
}