#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
typedef long long ll;
using namespace std;

int C[3][3],a[3],b[3];

int main(void){
    rep(i,3)rep(j,3)cin >> C[i][j];
    rep(i,3)b[i] = C[i][0];
    rep(i,3)a[i] = C[0][i] - b[0];
    rep(i,3)rep(j,3)if(b[i]+a[j] != C[i][j]){cout << "No" << endl;return 0;}
    cout << "Yes" << endl;
    return 0;
}
