import java.util.Scanner

import scala.collection.mutable.ArrayBuffer
import scala.util.control.Breaks
import scala.math.abs

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt()
  sc.nextLine()

  val array = ArrayBuffer(List(0, 0, 0))

  (1 to n).foreach(_ => array += sc.nextLine().split(" ").map(_.toInt).toList)

  val b = new Breaks
  b.breakable {
    for (i <- (0 to n - 1)) {
      val now = array(i)
      val next = array(i + 1)

      val tn = abs(next(0) - now(0))
      val xn = abs(next(1) - now(1))
      val yn = abs(next(2) - now(2))

      tn - (xn + yn) match {
        case r if r < 0 => println("No"); b.break()
        case r if r % 2 == 0 =>
        case _ => println("No"); b.break()
      }
    }
    println("Yes")
  }

}
