import java.util.Scanner
import scala.math._
object Main {
  def main(args:Array[String]) {
    val sc = new Scanner(System.in)
    val n,w,h = sc.nextInt()
    val x = Array.fill(w+1)(false);
    val y = Array.fill(h+1)(false);
    for(i <- 1 to n) {
      val xi, yi, wi = sc.nextInt()
      for(j <- max(0, xi-wi) to min(w, xi+wi)) {
        x(j) = true
      }
      for(j <- max(0, yi-wi) to min(h, yi+wi)) {
        y(j) = true
      }
    }
    println(if(x.forall(_ == true) || y.forall(_ == true)) "Yes" else "No")
  }
}