import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

bool calc(int[][] g) {

    for (int i = 0; i <= 100; i++) {
        int a1 = i;

        int b1 = g[0][0] - a1;
        int b2 = g[0][1] - a1;
        int b3 = g[0][2] - a1;
        int a2 = g[1][0] - b1;
        int a3 = g[2][0] - b1;

        auto as = [a1, a2, a3];
        auto bs = [b1, b2, b3];
        bool ok = true;
        for (int j = 0; j < 3; j++) {
            for (int k = 0; k < 3; k++) {
                int x = as[j] + bs[k];
                if (x < 0 || x > 100 || x != g[j][k]) {
                    ok = false;
                }
            }
        }
        if (ok) return true;
    }

    return false;
}

void main() {
    auto g = new int[][](3, 3);

    for (int i = 0; i < 3; i++) {
        auto xs = readints;
        for (int j = 0; j < 3; j++) {
            g[i][j] = xs[j];
        }
    }
    writeln(calc(g) ? "Yes" : "No");
}