object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val list: Seq[Seq[Int]] = Seq(0,0,0) :: List.fill(n, 3)(sc.nextInt.toInt)
    
  val check = (term: Int, start: (Int, Int), end: (Int, Int)) => {
    val diffX = math.abs(end._1 - start._1)
    val diffY = math.abs(end._2 - start._2)
    val diff = diffX + diffY
    
    (diff <= term) && (diff % 2 == term % 2)
  }
  
  val results: Seq[Boolean] = for (index <- (1 to n)) yield {
    check(list(index)(0) - list(index - 1)(0), (list(index - 1)(1), list(index - 1)(2)), (list(index)(1), list(index)(2)))
  }
  val result = !results.contains(false)
  
  println(if (result) "Yes" else "No")
}