object Main extends App {
  val n = io.StdIn.readLine.toInt
  val arr = Iterator.continually(io.StdIn.readLine.split(" "))
    .take(n)
    .toBuffer
  val ans = (Array(Array("0","0","0")).toBuffer++arr)
    .zip(arr)
    .forall{case (cur, nex) => {
      val dt =nex(0).toInt - cur(0).toInt
      val dist = (nex(1).toInt - cur(1).toInt).abs +
                 (nex(2).toInt - cur(2).toInt).abs
      dt >= dist && (dist&1) == (dt&1)
    }}

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