object Main extends App{
  val nwh = io.StdIn.readLine().split(' ').map(_.toInt)

  var mas = Array.fill(nwh(2))(Array.fill(nwh(1))(false))



  for(i <- 0 until nwh(0)){
    val xyw = io.StdIn.readLine().split(' ').map(_.toInt)
    val miny = if(xyw(1) >= xyw(2)) xyw(1) - xyw(2) else 0
    val minx = if(xyw(0) >= xyw(2)) xyw(0) - xyw(2) else 0
    val maxy = if(xyw(1) + xyw(2) <= nwh(2)) xyw(1) + xyw(2) - 1 else nwh(2) - 1
    val maxx = if(xyw(0) + xyw(2) <= nwh(1)) xyw(0) + xyw(2) - 1 else nwh(1) - 1

    for(j <- miny to maxy){
      for(k <- 0 until nwh(1)){
        mas(j)(k) = true
      }
    }

    for(j <- 0 until nwh(2)){
      for(k <- minx to maxx){
        mas(j)(k) = true
      }
    }
/*
    for(j <- 0 until nwh(2)){
      for(k <- 0 until nwh(1)){
        printf("%b ", mas(j)(k))
      }
      println()
    }
    println()
*/    
  }

  var sum = 0
  for(j <- 0 until nwh(2)){
    sum += mas(j).count(a => a)
  }
 // println(sum)

  println(if(sum == nwh(1) * nwh(2)) "Yes" else "No")
}