import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.numeric;


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

  auto h1 = c[0][0] - c[0][1];
  auto h2 = c[0][0] - c[0][2];
  auto h3 = c[0][1] - c[0][2];
  auto v1 = c[0][0] - c[1][0];
  auto v2 = c[0][0] - c[2][0];
  auto v3 = c[1][0] - c[2][0]; 
  bool f;
  foreach (i; 1..3) {
    if (h1 != c[i][0] - c[i][1]) {
      f = true;
    }
    if (h2 != c[i][0] - c[i][2]) {
      f = true;
    }
    if (h3 != c[i][1] - c[i][2]) {
      f = true;
    }
    if (v1 != c[0][i] - c[1][i]) {
      f = true;
    }
    if (v2 != c[0][i] - c[2][i]) {
      f = true;
    }
    if (v3 != c[1][i] - c[2][i]) {
      f = true;
    }
  }
  if (f) {
    writeln("No");
  } else {
    writeln("Yes");
  }
}
