#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define REP(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define RREP(i, n) RFOR(i, n, 0)
#define MFOR(i, m) for(auto i=(m).begin();i!=(m).end();i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((int)(x).size())

typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(vector<T> const& s) {
  REP(i, SZ(s)) {
    cout << s[i];
    if(i == SZ(s)-1) {
      cout << endl;
    } else {
      cout << " ";
    }
  }
}

int main () {
  cin.tie(0);
  cout << fixed << setprecision(10);
  int n, w, h; cin >> n >> w >> h;
  vector<P> a(n);
  vector<P> b(n);
  REP(i, n) {
    int x, y, p;
    cin >> x >> y >> p;
    a[i].fi = x - p;
    a[i].se = x + p;
    b[i].fi = y - p;
    b[i].se = y + p;
  }
/*   a.pb(make_pair(0, 0));
  a.pb(make_pair(w, 0));
  b.pb(make_pair(0, 0));
  b.pb(make_pair(h, 0)); */

  sort(ALL(a));
  sort(ALL(b));

/*   REP(i, n) {
    cout << a[i].fi << ":" << a[i].se << endl;
  }
  REP(i, n) {
    cout << b[i].fi << ":" << b[i].se << endl;;
  } */

  vector<bool> sela(w+1, true), selb(h+1, true);

  int pos = 0;
  int now = 0;
  int prev = 0;

/*   while(pos <= w) {
    if(now == n) {
      sela[pos] = false;
      pos++;
    } else if(pos < a[now].fi) {
      sela[pos] = false;
      pos++;
    } else if(pos == a[now].fi) {
      if(prev >= pos) {

      }
    }
  } */


  while(pos <= w) {
    // const int debug = 50001;
    if(now == n) {
      //if(pos == debug) cout << "A" << endl;
      sela[pos] = false;
      pos++;
    } else if(a[now].fi < pos && pos < a[now].se) {
      //if(pos == debug) cout << "B" << endl;
      //if(pos == debug) cout << a[now].fi << ":" << pos << ":" << a[now].se << endl;
      pos++;
    } else if(pos < a[now].fi) {
      //if(pos == debug) cout << "C" << endl;
      sela[pos] = false;
      pos++;
    } else if(pos == a[now].fi) {
      // if(pos == debug) cout << "D" << endl;
      if(prev < pos) sela[pos] = false;
      pos++;
    } else if(pos == a[now].se) {
      prev = max(prev, pos);
      pos++;
      now++;
    } else {
      //if(pos == debug) cout << "D" << endl;
      now++;
    }
  }

  pos = 0;
  now = 0;
  while(pos <= h) {
    // const int debug = 50001;
    if(now == n) {
      //if(pos == debug) cout << "A" << endl;
      selb[pos] = false;
      pos++;
    } else if(b[now].fi < pos && pos < b[now].se) {
      //if(pos == debug) cout << "B" << endl;
      //if(pos == debug) cout << b[now].fi << ":" << pos << ":" << b[now].se << endl;
      pos++;
    } else if(pos < b[now].fi) {
      //if(pos == debug) cout << "C" << endl;
      selb[pos] = false;
      pos++;
    } else if(pos == b[now].fi) {
      // if(pos == debug) cout << "D" << endl;
      if(prev < pos) selb[pos] = false;
      pos++;
    } else if(pos == b[now].se) {
      prev = max(prev, pos);
      pos++;
      now++;
    } else {
      //if(pos == debug) cout << "D" << endl;
      now++;
    }
  }

/*   printv(sela);
  printv(selb); */

  bool oka = true, okb = true;
  REP(i, w+1) oka &= sela[i];
  REP(i, h+1) okb &= selb[i];
  // cout << oka << ":" << okb << endl;
  cout << ((oka || okb) ? "Yes" : "No") << endl;
}



Measured memory_bytes: 4368