"use strict";

function Main(input) {
  input = input.split("\n");
  const N = input.shift();
  let x = 0;
  let y = 0;
  for (let i = 0; i < N; i++) {
    let row = input[i].split(" ");
    let flag = false;
    quit: for (let n = 0; n < row[0]; n++) {
      for (let m = 0; m < row[0]; m++) {
        if (
          (n == row[1] &&
            m == row[2] &&
            (row[0] - (Math.abs(x - n) + Math.abs(y - m))) % 2 == 0) ||
          (Math.abs(x - n) == row[1] &&
            Math.abs(y - m) == row[2] &&
            (row[0] - (Math.abs(x - n) + Math.abs(y - m))) % 2 == 0)
        ) {
          // console.log(row[0] - (Math.abs(x - n) + Math.abs(y - m)));
          // console.log(n, m);
          // console.log(Math.abs(x - n), Math.abs(y - m));
          x = n;
          y = m;
          flag = true;
          break quit;
        }
      }
    }
    if (row[0] == 0) continue;
    if (flag == false) {
      console.log("No");
      return;
    }
  }
  console.log("Yes");
}

Main(require("fs").readFileSync("/dev/stdin", "utf-8"));
