program main
implicit none
integer :: i, j, k, c(3), d(2)

do i = 1, 3
   read(*,*) c(1:3)
   if( i.ge.2 ) then
      do j = 1, 2
         if( d(j) /= c(j+1)-c(j) ) then
            write(*,*) 'No'
            stop
         end if
      end do
   end if
   do j = 1, 2
      d(j) = c(j+1)-c(j)
   end do
end do
write(*,*) 'Yes'

end program main
