function Main(s) {
  var s = s.split("\n");
  var s = [
    s[0].split(" ").map(e => Number(e)),
    s[1].split(" ").map(e => Number(e)),
    s[2].split(" ").map(e => Number(e))
  ];
  var t, cnt, a2, a3, b1, b2, b3;
  for (var a1 = 0; a1 <= s[0][0]; a1++) {
    cnt = 0;
    b1 = s[0][0] - a1;
    b2 = s[0][1] - a1;
    b3 = s[0][2] - a1;
    a2 = s[1][0] - b1;
    a3 = s[2][0] - b1;
    t = [
         [a1+b1,a1+b2,a1+b3],
         [a2+b1,a2+b2,a2+b3],
         [a3+b1,a3+b2,a3+b3]
           ];
    for (var i = 0; i < 3; i++) {
      for (var j = 0; j < 3; j++) {
        if (s[i][j] === t[i][j]) cnt++;
      }
    }
    if (cnt === 9) {
      console.log("Yes");
      return;
    }
  }
  console.log("No")
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));