function Main(input){
  input = input.split("\n");
  var N = Number(input[0]);
  var pre = [];
  for(var i=1;i<=N;i++){
  	tmp = input[i].split(" ");
    tmp = tmp.map((a)=>Number(a));
    if((tmp[0]-pre[0])<(tmp[1]+tmp[2]-pre[1]-pre[2])){
      console.log('No');
      break;
    }
    if((tmp[0]-pre[0])%(tmp[1]+tmp[2]-pre[1]-pre[2])!=0){
      console.log('No');
      break;
    }
    pre = [tmp[0],tmp[1],tmp[2]];
    if(i==N){
      console.log('Yes');
    }
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
