#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i,a,b) for(int i=a;i<b;++i)
#define pii pair<int,int> 
typedef long long ll;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ll n,w;
    cin>>n>>w;
    ll pw[(int)2e5+20]={0};
    rep(i,0,n)
    {
        ll x,y,z;
        cin>>x>>y>>z;
        pw[x]+=z;
        pw[y]-=z;
    }
    bool f=1;
    if(pw[0]>w) f=0;
    rep(i,1,(int)2e5+20)
    {
        pw[i]+=pw[i-1];
        if(pw[i]>w)
        {
            f=0;
            break;
        }
    }
    f?cout<<"Yes":cout<<"No";
}
/**
  *  Author: dhruv_gheewala
  *  Problem: B - Many Oranges
  *  Date:   13.03.2021
  *  Time:   18:43:19
**/

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

#ifndef DEBUG

#define fundri 108
#define debug(...) 1729
#define endl '\n'

#endif

#define int int64_t

typedef pair<int, int> pii;
typedef vector<int> vi;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline int rnd(int l = 0, int r = INT_MAX) {return uniform_int_distribution<int>(l, r)(rng);}

template<typename T>
bool in_range(T x, T l, T r) {return l <= x && x <= r;}
template<typename H, typename ...T>void inp(H &head) {cin >> head;}
template<typename H, typename ...T>void inp(H &head, T &...tail) {cin >> head;inp(tail...);}
template<typename T>inline istream &operator >>(istream &in, vector<T> &a) {for(T &x : a)in >> x; return in;}
template<typename T, typename U>inline istream &operator >>(istream &in, pair<T, U> &a) {in >> a.first >> a.second; return in;}

// Multi-Dimension Vector
// Usage: vec<n, data-type> dp(dimention-1, dimention-2, ..., dimention-n, default = data-type())
template<int D, typename T> struct vec : public vector<vec<D - 1, T>>
{
    static_assert(D >= 1, "Vector dimensions must be greater than zero !!");
    template<typename... Args>
    vec(int n = 0, Args... args) : vector<vec<D - 1, T>>(n, vec<D - 1, T>(args...)){}
};

template<typename T> struct vec<1, T> : public vector<T> {vec(int n = 0, T val = T()) : vector<T>(n, val){}};

const int inf = 1e15;
const bool testcases = false;

void preprocess();
void solve(int tc);
int32_t main(int32_t argc, char **argv)
{
    preprocess();
    int TC = 1;
    if(testcases)
        cin >> TC;

    for(int tc = 1; tc <= TC; ++tc) {
        solve(tc);
        fundri;
    }
    exit(0);
}

void preprocess()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

#ifdef DHRUV_GHEEWALA
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    freopen("debug.txt", "w", stderr);
#endif
}

void solve(int tc)
{
    int a, b, w;
    cin >> a >> b >> w;
    w *= 1000;

    int mini = inf, maxi = -inf;
    for(int i = 1; i <= w; i++) {
        if(in_range(w, i * a, i * b)) {
            mini = min(mini, i);
            maxi = max(maxi, i);
        }
    }

    if(mini == inf) {
        cout << "UNSATISFIABLE" << endl;
        return;
    }

    cout << mini << ' ' << maxi << endl;
}