object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val list = 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 result = (Seq(0,0,0) :: list).zip(list).forall{
    case ((Seq(t,x,y), Seq(t2, x2, y2))) => {
  	  check(t2 - t, (x, y), (x2, y2))
  	}
  }
  
  println(if (result) "Yes" else "No")
}