program probC
  implicit none
  integer :: c(3,3),a(3),b(3)
  integer i,j,k,ans

  do i=1,3
     read(*,*) c(i,1:3)
  end do

  do i=0,100
     ans=0
     a(1)=i

     b(1)=c(1,1)-a(1)
     b(2)=c(1,2)-a(1)
     b(3)=c(1,3)-a(1)
     
     a(2)=c(2,1)-b(1)
     a(3)=c(3,1)-b(1)

     do j=1,3
        do k=1,3
           if(c(j,k).ne.a(j)+b(k)) ans=1
        end do
     end do

     if(ans==0) then
        write(*,*) 'Yes'
        stop
     end if
  end do

  write(*,*) 'No'
  
end program probC
