import std.stdio, std.conv, std.string;
import std.algorithm, std.array, std.container;
import std.numeric, std.math;
import core.bitop;

T RD(T = string)() { static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }

long mod = pow(10, 9) + 7;
long moda(long x, long y) { return (x + y) % mod; }
long mods(long x, long y) { return ((x + mod) - (y % mod)) % mod; }
long modm(long x, long y) { return (x * y) % mod; }

void main()
{
	//auto N = RD!long;
	
	long[][] c;
	foreach (i; 0..3)
	{
		c ~= RDR.split.to!(long[]);
	}

	bool ans = false;
	long[3] xs, ys;
	foreach (x0; 0..101)
	{
		xs[0] = x0;
		ys[0] = c[0][0] - xs[0];
		foreach (x1; 0..101)
		{
			xs[1] = x1;
			ys[1] = c[1][0] - xs[0];
			foreach (x2; 0..101)
			{
				bool ng = false;
				xs[2] = x2;
				ys[2] = c[2][0] - xs[0];
				foreach (i; 0..3)
				{
					foreach (j; 1..3)
					{
						if (c[i][j] != xs[j] + ys[i])
						{
							ng = true;
						}
					}
				}
				ans |= !ng;
			}
		}
	}
	
	writeln(ans ? "Yes" : "No");
	stdout.flush();
}