open Printf
open Scanf

let id x = x

let c11, c12, c13 = scanf "%d %d %d " (fun x y z -> x, y, z)
let c21, c22, c23 = scanf "%d %d %d " (fun x y z -> x, y, z)
let c31, c32, c33 = scanf "%d %d %d"  (fun x y z -> x, y, z)

let () =
    for a1 = 0 to 100 do
        for a2 = 0 to 100 do
            for a3 = 0 to 100 do
                let b1 = c11 - a1 in
                let b2 = c22 - a2 in
                let b3 = c33 - a3 in
                if c21 = a2 + b1 && c31 = a3 + b1 &&
                   c12 = a1 + b2 && c13 = a1 + b3 &&
                   c23 = a2 + b3 && c32 = a3 + b2
                then
                    (print_endline "Yes"; exit 0)
            done
        done
    done;
    print_endline "No"
