const main = () => {
  const txys = getParams()
      , txys_with_init = [[0,0,0], ...txys];
  console.log(solve(txys_with_init));
};

const getParams = () =>
  getStdin().split('\n').slice(1).map(s => s.split(' ').map(Number));

const getStdin = () =>
  require('fs').readFileSync('/dev/stdin', 'utf8').trim();

const solve = txys => {
  const pairs = zip(txys, txys.slice(1));
  return pairs.every(p => reachable(p[0], p[1])) ? 'Yes' : 'No';
};

const zip = (xs, ys) => {
  const minlen = Math.min(xs.length, ys.length);
  return [...Array(minlen).keys()].map(i => [xs[i], ys[i]]);
};

const reachable = (txy1, txy2) => {
  const t1 = txy1[0]
      , t2 = txy2[0]
      , x1 = txy1[1]
      , x2 = txy2[1]
      , y1 = txy1[2]
      , y2 = txy2[2]
      , difft = t2 - t1
      , distance = manhattanDistance(x1, x2, y1, y2);
  return enoughTime(difft, distance) && sameParity(difft, distance);
};

const manhattanDistance = (x1, x2, y1, y2) =>
  Math.abs(x1 - x2) + Math.abs(y1 - y2);

const enoughTime = (difft, distance) =>
  difft >= distance;

const sameParity = (m, n) =>
  m % 2 === n % 2;

main();
