/*** author: yuji9511 ***/
#include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
using vll = vector<ll>;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i=(m);i<(n);i++)
#define rrep(i,m,n) for(ll i=(m);i>=(n);i--)
ostream& operator<<(ostream& os, lpair& h){ os << "(" << h.first << ", " << h.second << ")"; return os;}
#define printa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1];};
void print() {}
template <class H,class... T>
void print(H&& h, T&&... t){cout<<h<<" \n"[sizeof...(t)==0];print(forward<T>(t)...);}

void solve(){
    ll N,C;
    cin >> N >> C;
    vll a(N),b(N),c(N);
    rep(i,0,N) cin >> a[i] >> b[i] >> c[i];
    typedef struct {
        ll pos;
        ll val;
        ll t;
    } P;
    vector<P> v;
    rep(i,0,N){
        v.push_back({a[i], c[i], 0});
        v.push_back({b[i]+1, c[i], 1});
    }
    sort(v.begin(), v.end(),[](P p1, P p2){
        if(p1.pos == p2.pos){
            return p1.t < p2.t;
        }
        return p1.pos < p2.pos;
    });

    ll ans = 0;
    ll sum = 0;
    ll prev_pos = -1;
    for(auto &e: v){
        if(prev_pos != -1){
            if(sum <= C){
                ans += sum * (e.pos - prev_pos);
            }else{
                ans += C * (e.pos - prev_pos);
            }
        }
        if(e.t == 0){
            sum += e.val;
        }else{
            sum -= e.val;
        }
        prev_pos = e.pos;
    }
    print(ans);
    



}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
}
/* Hardwork allways pays off */
//You never know how close to the solution you are ,so keep practicing
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional> // for less 
#include <iostream> 
using namespace __gnu_pbds; 
using namespace std; 
  
#define int long long  

#define ld long double
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pii pair<int,int>
#define endl '\n'
#define REP(i,n) for(int i=1;i<=n;i++)
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower)
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper)
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(x) (x).begin(), (x).end()
#define mod1 998244353 
#define mod 1000000007 
#define pie 3.141592653589793238
#define printv(x) for(i=0;i<x.size();i++) cout<<x[i]<<" ";
#define printA(x,n) for(i=0;i<n;i++) cout<<x[i]<<" ";
#define F first
#define S second
#define vi vector<int>
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> new_data_set; 

void make_unique(vector<int> vec)
{
sort(all(vec));
vec.resize(unique(all(vec)) - vec.begin());
}
 
bool isPowerOfTwo(int n)
{
   if(n==0)
   return false;
 
   return (ceil(log2(n)) == floor(log2(n)));
}
int cceil(int x, int y){
    return (x+y-1)/y;
}
struct Cmp
{
        bool operater(const pair<int,int> &a,const pair<int,int> &b)
       {
               return (a.second)<(b.second);
       }

};
bool cmp(const pair<int,int> &a,const pair<int,int> &b)
{
       return (a.second)<(b.second);
}


signed main() 
 {   ios;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin); 
    freopen("output.txt", "w", stdout);
    #endif
    // cout.precision(1);
    // cout<<fixed;
    int t=1;
    // init();
      // cin>>t; 
    while(t--)
    {
        int n,x,i,j,flag=0,count=0,sum=0;
        int v,ti,s,d;
        cin>>v>>ti>>s>>d;
        if(ti*v<=d&&s*v>=d)
          cout<<"No"<<endl;
        else 
          cout<<"Yes"<<endl;





    }
    return 0;
 
}