#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"c=[list(map(int,input().split()))for _ in range(3)]\n"
"for i in range(c[0][0]+1):\n"
"    b=[c[0][0]-i,c[0][1]-i,c[0][2]-i]\n"
"    a=[i,c[1][0]-b[0],c[2][0]-b[0]]\n"
"    t=1\n"
"    for j in range(3):\n"
"        for k in range(3):\n"
"            if c[j][k]!=a[j]+b[k]:\n"
"                t=0\n"
"                break\n"
"    if t:\n"
"        print('Yes')\n"
"        exit()\n"
"print('No')\n"
"\"";
  system(s);
  return 0;
}            