program main
    integer :: c(3,3), d

    read(*,*) c(:,1)
    read(*,*) c(:,2)
    read(*,*) c(:,3)

    d=c(2,1)-c(1,1)
    if(d==c(2,2)-c(1,2).and.d==c(2,3)-c(1,3))then
        d=c(3,1)-c(2,1)
        if(d==c(3,2)-c(2,2).and.d==c(3,3)-c(2,3))then
            d=c(3,1)-c(1,1)
            if(d==c(3,2)-c(1,2).and.d==c(3,3)-c(1,3))then
                write(*,*) 'Yes'
                stop
            endif
        endif
    endif
    
    write(*,*) 'No'
    
end program