#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using msi = map<string, int>;
using mii = map<int, int>;
using pii = pair<int, int>;
using vlai = valarray<int>;
using ll = long long;
int main(void) {
  int n, w, h;
  cin >> n >> w >> h;
  vi wl(w + 1, 0), hl(h + 1, 0);
  for (int i = 0; i < n; i++) {
    int x, y, w;
    cin >> x >> y >> w;
    wl[x - w]++;
    wl[x + w]--;
    hl[y - w]++;
    hl[y + w]--;
  }
  partial_sum(wl.begin(), wl.end(), wl.begin());
  partial_sum(hl.begin(), hl.end(), hl.begin());
  cout << (count(wl.begin(), wl.end(), 0) || count(hl.begin(), hl.end(), 0)
               ? "No"
               : "Yes")
       << endl;
}
