import std.stdio,
       std.string,
       std.conv;

void main() {
  int[][] c;
  for (int i = 0; i < 3; i++) {
    c ~= to!(int[])(readln.chomp.split);
  }

  int[3] a, b;
  // a[0] = 0 と仮定
  foreach (i, e; c[0]) {
    b[i] = e;
  }
  for (int i = 1; i < 3; i++) {
    a[i] = c[i][i] - b[i];
  }

  bool f = true;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 3; j++) {
      // writeln(c[i][j], " == ", a[i], " + ", b[j]);
      f = f & (c[i][j] == a[i] + b[j]);
    }
  }

  writeln(f ? "Yes" : "No");
}
