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

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

  int[][] hoge;
  hoge ~= [a[0][0], a[0][1], a[1][0], a[1][1]];
  hoge ~= [a[0][2], a[0][1], a[1][2], a[1][1]];
  hoge ~= [a[2][0], a[1][0], a[2][1], a[1][1]];
  hoge ~= [a[2][2], a[2][1], a[1][2], a[1][1]];

  int[][][] poyo;
  poyo ~= [a[0], a[1]];
  poyo ~= [a[0], a[2]];
  poyo ~= [a[1], a[2]];
  poyo ~= [[a[0][0], a[1][0], a[2][0]], [a[0][1], a[1][1], a[2][1]]];
  poyo ~= [[a[0][0], a[1][0], a[2][0]], [a[0][2], a[1][2], a[2][2]]];
  poyo ~= [[a[0][1], a[1][1], a[2][1]], [a[0][2], a[1][2], a[2][2]]];

  writeln((judgeArray1(hoge) && judgeArray2(poyo) ? "Yes" : "No"));
}

bool judgeArray1(int[][] arr) {
  bool f = true;
  foreach (ref int[] e; arr) {
    f = judge1(e);
  }
  return f;
}

bool judge1(int[] arr) {
  return arr[0] - (arr[1] + arr[2]) == -arr[3];
}

bool judgeArray2(int[][][] arr) {
  bool f = true;
  foreach (ref int[][] e; arr) {
    f = judge2(e);
  }
  return f;
}

bool judge2(int[][] arr) {
  // writeln(arr, arr[0][0] - arr[0][1], arr[1][0] - arr[1][1]);
  return ((arr[0][0] - arr[0][1] == arr[1][0] - arr[1][1]));
}

