program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: c(3,3),i,j
    integer(int32):: a12,a23,a13,b12,b23,b13

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

    a12 = c(1,1) - c(1,2)
    a23 = c(1,2) - c(1,3)
    a13 = c(1,1) - c(1,3)
    
    do i=2,3
        if(c(i,1)-c(i,2) /= a12 .or. c(i,2)-c(i,3) /= a23 .or. c(i,1)-c(i,3) /= a13) then
            print*, 'No'
            stop 
        end if
    end do

    b12 = c(1,1) - c(2,1)
    b23 = c(2,1) - c(3,1)
    b13 = c(1,1) - c(3,1)
    
    do i=2,3
        if(c(1,i)-c(2,i) /= b12 .or. c(2,i)-c(3,i) /= b23 .or. c(1,i)-c(3,i) /= b13) then
            print*, 'No'
            stop 
        end if
    end do

    print*, 'Yes'
    
end program name