#include <algorithm>
#include <cassert>
#include <cmath>
#include <functional>
#include <iostream>
#include <vector>

using namespace std;
int facctorial(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
int H, W, A, B;

struct Point {
  Point(int x, int y) : x(x), y(y) {}
  int x, y;
};

bool erase_tile(std::vector<Point>& v, Point p) {
  bool s = false;
  for (auto it = v.begin(); it != v.end();) {
    if ((*it).x == p.x && (*it).y == p.y) {
      it = v.erase(it);
      s = true;
    } else {
      ++it;
    }
  }
  return s;
}

std::vector<Point> dir = {Point(0, 1), Point(1, 0)};

int fill_A(const std::vector<Point>& r, int n) {
  int ans = 0;
  bool has = false;
  if (n == 0) return 1;
  for (auto e : r) {
    for (auto d : dir) {
      auto r_ = r;
      bool s = erase_tile(r_, Point(e.x + d.x, e.y + d.y));
      if (s) {
        has = true;
        erase_tile(r_, e);
        ans += fill_A(r_, n-1);
      }
    }
  }
  return ans;
}

int main() {

  std::cin >> H >> W >> A >> B;
  std::vector<Point> rect;
  for (int h = 0; h < H; h++) {
    for (int w = 0; w < W; w++) {
      rect.emplace_back(Point(h, w));
    }
  }
  std::cout << fill_A(rect, A)/facctorial(A)<< endl;
  ;
}

// abc183_d
#include <bits/stdc++.h>
#ifdef LOCAL
#include "../cxx-prettyprint/prettyprint.hpp"
#endif
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

#define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define REP_REV(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (int (i) = (int)(n) - 1 ; (i) >= m ; --(i))
#define ALL(x) x.begin(), x.end()

#define INF (ll)(1e9)
#define MOD (1000000007)

#define print2D(h, w, arr) REP(i, h) { REP(j, w) cout << arr[i][j] << " "; cout << endl; }
#define print_line(vec, n) {for(int idx=0;idx<(n-1);idx++) cout << (vec)[idx] << " "; cout << (vec)[(n)-1] << endl;}
template<class T> void print(const T& x){cout << x << "\n";}
template<class T, class... A> void print(const T& first, const A&... rest) { cout << first << " "; print(rest...); }
struct PreMain {PreMain(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(20);}} premain;

// 区間add, 区間sum
template<typename T>
struct LazySegmentTree{
    int n;
    vector<T> val;
    vector<T> lazy;
    vector<int> width;

    explicit LazySegmentTree(int n_){
        n = 1;
        while (n < n_) n <<= 1;

        val = vector<T>(n<<1, 0);
        lazy = vector<T>(n<<1, 0);
        width = vector<int>(n<<1, 1);
        for (int i = n-2; i >= 0; i--) {
            width[i] = width[i*2+1] + width[i*2+2];
        }
    }
    void lazy_propagate(int k) {
        val[k] += lazy[k] * width[k];
        if (k < n-1) {
            lazy[k*2+1] += lazy[k];
            lazy[k*2+2] += lazy[k];
        }
        lazy[k] = 0;
    }
    void add(int a, int b, int k, int l, int r, int x) {
        lazy_propagate(k);

        if (b <= l || r <= a) {
            return;
        }
        if (a <= l && r <= b) {
            lazy[k] += x;
            lazy_propagate(k);
            return;
        }
        int mid = (l+r)/2;
        add(a, b, k*2+1, l, mid, x);
        add(a, b, k*2+2, mid, r, x);
        val[k] = val[k*2+1] + val[k*2+2];
    }

    void add(int a, int b, int x) {
        add(a, b, 0, 0, n, x);
    }

    T get_sum(int a, int b, int k, int l, int r) {
        lazy_propagate(k);

        if (b <= l || r <= a) {
            return 0;
        }
        if (a <= l && r <= b) {
            return val[k];
        }
        int mid = (l+r)/2;
        T sl = get_sum(a, b, k*2+1, l, mid);
        T sr = get_sum(a, b, k*2+2, mid, r);
        return sl + sr;
    }

    T get_sum(int a, int b) {
        return get_sum(a, b, 0, 0, n);
    }
};

int main() {
#ifdef LOCAL
    ifstream in("../arg.txt"); cin.rdbuf(in.rdbuf());
#endif


    int N, W;
    cin >> N >> W;

    int mx = 2e5+1;
    LazySegmentTree<ll> st(mx);

    REP(i, N){
        int s, t, p;
        cin >> s >> t >> p;
        st.add(s, t, p);
    }

    REP(i, mx){
        ll w = st.get_sum(i, i+1);
        if (w > W){
            print("No");
            return 0;
        }
    }
    print("Yes");


    return 0;
}
