import scala.io.StdIn._
object Main extends App {
  readLine.toInt
  val Array(x1, y1, h1) = readLine.split(" ").map{_.toInt}

  val (x, y, h) = eliminate(for {
    xi <- 0 to 100
    yi <- 0 to 100
    h = h1 + Math.abs(x1 - xi) + Math.abs(y1 - yi) if h > 0
  } yield (xi, yi, h))

  println(s"$x $y $h")

  def eliminate(candidates: Seq[(Int, Int, Int)]): (Int, Int, Int) = {
    val Array(x, y, h) = readLine.split(" ").map{_.toInt}
    val eliminated = candidates.filter(c => h + Math.abs(c._1 - x) + Math.abs(c._2 - y) == c._3)
    if (eliminated.tail.isEmpty) eliminated.head
    else eliminate(eliminated)
  }
}