object Main extends App {
  val scan = new java.util.Scanner(System.in)
  val n, w, h = scan.next().toInt

  val col = Array.fill(h+1)(0)
  val row = Array.fill(w+1)(0)

  val ns = for (_ <- 1 to n) {
    val x, y, n = scan.next().toInt
    row(math.max(0, x-n))  += 1
    if (w >= x+n) row(x+n) -= 1
    col(math.max(0, y-n))  += 1
    if (h >= y+n) col(y+n) -= 1
  }

  var c, r = 0
  for (i <- 0 to w) {
    r += row(i)
    row(i) = r
  }
  for (i <- 0 to h) {
    c += col(i)
    col(i) = c
  }

  // println(col.toList)
  // println(row.toList)
  if (col.filter(_ > 0).length == h || row.filter(_ > 0).length == w) {
    println("Yes")
  } else {
    println("No")
  }
}
