// Slower C++ solution:
// g++ -std=c++11 a.cpp

#include<iostream>

#include<vector>

#include<string>

#include<algorithm>	

#include<map>

#include<set>

#include<utility>

#include<cmath>

#include<random>

#include<cstring>

#include<queue>

#include<stack>

#include<bitset>

#include<cstdio>

#include<sstream>

#include<iomanip>

#include<assert.h>

#include<typeinfo>

#define loop(i,a,b) for(int i=a;i<b;i++) 

#define rep(i,a) loop(i,0,a)

#define pb push_back

#define all(in) in.begin(),in.end()

#define shosu(x) fixed<<setprecision(x)

using namespace std;

//kaewasuretyuui

typedef long long ll;

//#define int ll

typedef int Def;

typedef pair<Def,Def> pii;

typedef vector<Def> vi;

typedef vector<vi> vvi;

typedef vector<pii> vp;

typedef vector<vp> vvp;

typedef vector<string> vs;

typedef vector<double> vd;

typedef vector<vd> vvd;

typedef pair<Def,pii> pip;

typedef vector<pip>vip;

// #define mt make_tuple

//typedef tuple<pii,int,int> tp;

//typedef vector<tp> vt;

template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}

template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}

//template<class C>constexpr int size(const C &c){return (int)c.size();}

//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}

const double PI=acos(-1);

const double EPS=1e-7;

Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9;

int dx[]={0,1,0,-1};

int dy[]={1,0,-1,0};

int main(){

	int n=3;

	vvi in(n,vi(n));

	rep(i,n)rep(j,n)cin>>in[i][j];

	bool h=false;

	rep(i,400)rep(j,400)rep(k,400){

		bool H=true;

		rep(q,3)if(in[0][q]-i>=0&&in[0][q]-i==in[1][q]-j&&in[0][q]-i==in[2][q]-k);

		else H=false;

		if(H)h=true;

	}

	if(h)cout<<"Yes"<<endl;

	else cout<<"No"<<endl;

}














// Faster C++ solution for the same problem (measured speedup: 1.5092729181895423x):
// g++ -std=c++11 a.cpp

#include<iostream>

#include<vector>

#include<string>

#include<algorithm>	

#include<map>

#include<set>

#include<utility>

#include<cmath>

#include<random>

#include<cstring>

#include<queue>

#include<stack>

#include<bitset>

#include<cstdio>

#include<sstream>

#include<iomanip>

#include<assert.h>

#include<typeinfo>

#define loop(i,a,b) for(int i=a;i<b;i++) 

#define rep(i,a) loop(i,0,a)

#define pb push_back

#define all(in) in.begin(),in.end()

#define shosu(x) fixed<<setprecision(x)

using namespace std;

//kaewasuretyuui

typedef long long ll;

//#define int ll

typedef int Def;

typedef pair<Def,Def> pii;

typedef vector<Def> vi;

typedef vector<vi> vvi;

typedef vector<pii> vp;

typedef vector<vp> vvp;

typedef vector<string> vs;

typedef vector<double> vd;

typedef vector<vd> vvd;

typedef pair<Def,pii> pip;

typedef vector<pip>vip;

// #define mt make_tuple

//typedef tuple<pii,int,int> tp;

//typedef vector<tp> vt;

template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}

template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}

//template<class C>constexpr int size(const C &c){return (int)c.size();}

//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}

const double PI=acos(-1);

const double EPS=1e-7;

Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9;

int dx[]={0,1,0,-1};

int dy[]={1,0,-1,0};

int main(){

	int n=3;

	vvi in(n,vi(n));

	rep(i,n)rep(j,n)cin>>in[i][j];

	bool h=false;

	rep(i,101)rep(j,101)rep(k,101){

		bool H=true;

		rep(q,3)if(in[0][q]-i>=0&&in[0][q]-i==in[1][q]-j&&in[0][q]-i==in[2][q]-k);

		else H=false;

		if(H)h=true;

	}

	if(h)cout<<"Yes"<<endl;

	else cout<<"No"<<endl;}