program sample
    implicit none
  
    integer(8) :: i,j,m,n,t,x(3),y(3),z(3)
   
  
    read(*,*)x
    
    read(*,*)y
    read(*,*)z
    if(x(1)+y(2)+z(3)==x(2)+y(3)+z(1) .and. x(1)+y(2)+z(3)==x(3)+y(1)+z(2))then
        if (x(1)+y(3)+z(2)==x(2)+y(1)+z(3) .and. x(3)+y(2)+z(1)==x(2)+y(1)+z(3))then
            write(*,*)'Yes'
            stop
        end if
    end if

    write(*,*) 'No'
  
    stop
end program sample
  

