"use strict"
function Main(input) {
  input = input.trim().split('\n');
  let h = input[0].trim().split(' ').map(Number);
  let m = input[1].trim().split(' ').map(Number);
  let l = input[2].trim().split(' ').map(Number);

  let x = [m[0]-h[0], m[1]-h[1], m[2]-h[2]]
  let y = [l[0]-m[0], l[1]-m[1], l[2]-m[2]]

  if(x[0] === x[1] && x[1] === x[2]){
    if(y[0] === y[1] && y[1] === y[2]){
      console.log('Yes');
      return;
    }
  }
  console.log('No');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));