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]];

  writeln((judgeArray(hoge) ? "Yes" : "No"));
}

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

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