object Main extends App {
  val n = io.StdIn.readLine.toInt
  val ans = Iterator.continually(io.StdIn.readLine.split(" "))
    .take(n)
    .foldLeft((0,0,0,true))((pre,cur) => {
      val t = cur(0).toInt
      val x = cur(1).toInt
      val y = cur(2).toInt
      val dt = t - pre._1.toInt
      val dist = (x - pre._2.toInt).abs +
                (y - pre._3.toInt).abs
      (t,x,y,pre._4 && dt >= dist && (dist&1) == (dt&1))
      })

  println(if(ans._4) "Yes" else "No")
}