#include<bits/stdc++.h>
#define For(i,j,k) for (int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define pii pair<int,int>
#define fi first
#define se second
#define PB push_back
#define ll long long
#define ull unsigned long long
#define y1 orzkcz
using namespace std;
const int N=3005;
const int mo=998244353;
int n,k,f[N][N];
int main(){
	scanf("%d%d",&n,&k);
	f[0][0]=1;
	For(i,0,n) Rep(j,i,0){
		f[i+1][j+1]=(f[i+1][j+1]+f[i][j])%mo;
		if (j%2==0) f[i][j/2]=(f[i][j/2]+f[i][j])%mo;
	}
	cout<<f[n][k]<<endl;
}
#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <deque>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <functional>
#include <iomanip>
#include <cstdint>
#define ll long long
#define rep2(i,a,b) for(int i=a;i<=b;++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define rep3(i,a,b) for(int i=a;i>=b;i--)
#define REP(e,v) for(auto e:v)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mp make_pair
#define mt make_tuple
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define vec vector
#define vi vec<int>
#define vl vec<ll>
#define vivi vec<vi>
#define vlvl vec<vl>
#define vpii vec<pii>
#define vpll vec<pll>
#define vbl vec<bool>
#define endl "\n"
#define ALL(c) (c).begin(),(c).end()
#define D(x) cout << (#x) << " is " << x << endl;
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}
string stin(){string s;cin>>s;return s;}
void drop(string s){cout<<s<<endl; exit(0);}
void drop(int x){cout<<x<<endl; exit(0);}
void drop(ll x){cout<<x<<endl; exit(0);}
int main(){
    int n = in();
    ll w = lin();
    vl plus(200010);
    rep(i,n){
        int s=in(),t=in(),p=in();
        plus[s] += p;
        plus[t] -= p;
    }
    ll tmp = 0;
    rep(i,200010){
        tmp += plus[i];
        if(tmp > w)drop("No");
    }
    drop("Yes");
}
