def main():

    c11, c12, c13 = list(map(int, input().split()))

    c21, c22, c23 = list(map(int, input().split()))

    c31, c32, c33 = list(map(int, input().split()))



    r1max = max([c11, c12, c13])

    r2max = max([c21, c22, c23])

    r3max = max([c31, c32, c33])

    c1max = max([c11, c21, c31])

    c2max = max([c12, c22, c32])

    c3max = max([c13, c23, c33])

    for a1 in range(0, r1max + 1):

        for a2 in range(0, r2max + 1):

            for a3 in range(0, r3max + 1):

                m = max([a1, a2, a3])

                for b1 in range(0, c1max - m + 1):

                    C11 = a1 + b1

                    C21 = a2 + b1

                    C31 = a3 + b1

                    if C11 == c11 and C21 == c21 and C31 == c31:

                        for b2 in range(0, c2max - m + 1):

                            C12 = a1 + b2

                            C22 = a2 + b2

                            C32 = a3 + b2

                            if C12 == c12 and C22 == c22 and C32 == c32:

                                for b3 in range(0, c3max - m + 1):

                                    C13 = a1 + b3

                                    C23 = a2 + b3

                                    C33 = a3 + b3

                                    if C13 == c13 and C23 == c23 and C33 == c33:

                                        print('Yes')

                                        return



    print('No')

    return





if __name__ == '__main__':

    main()
def main():

    c11, c12, c13 = list(map(int, input().split()))

    c21, c22, c23 = list(map(int, input().split()))

    c31, c32, c33 = list(map(int, input().split()))



    r1max = max([c11, c12, c13])

    r2max = max([c21, c22, c23])

    r3max = max([c31, c32, c33])

    c1max = max([c11, c21, c31])

    c2max = max([c12, c22, c32])

    c3max = max([c13, c23, c33])

    for a1 in range(0, r1max + 1):

        for a2 in range(0, r2max + 1):

            for a3 in range(0, r3max + 1):

                m = max([a1, a2, a3])

                for b1 in range(0, c1max - m + 1):

                    if a1 + b1 == c11 and a2 + b1 == c21 and a3 + b1 == c31:

                        for b2 in range(0, c2max - m + 1):

                            if a1 + b2 == c12 and a2 + b2 == c22 and a3 + b2 == c32:

                                for b3 in range(0, c3max - m + 1):

                                    if a1 + b3 == c13 and a2 + b3 == c23 and a3 + b3 == c33:

                                        print('Yes')

                                        return



    print('No')

    return





if __name__ == '__main__':

    main()
def main():
    c11, c12, c13 = list(map(int, input().split()))
    c21, c22, c23 = list(map(int, input().split()))
    c31, c32, c33 = list(map(int, input().split()))
    r1max = max([c11, c12, c13])
    r2max = max([c21, c22, c23])
    r3max = max([c31, c32, c33])
    c1max = max([c11, c21, c31])
    c2max = max([c12, c22, c32])
    c3max = max([c13, c23, c33])
    for a1 in range(0, r1max + 1):
        for a2 in range(0, r2max + 1):
            for a3 in range(0, r3max + 1):
                m = max([a1, a2, a3])
                for b1 in range(0, c1max - m + 1):
                    C11 = a1 + b1
                    C21 = a2 + b1
                    C31 = a3 + b1
                    if C11 == c11 and C21 == c21 and C31 == c31:
                        for b2 in range(0, c2max - m + 1):
                            C12 = a1 + b2
                            C22 = a2 + b2
                            C32 = a3 + b2
                            if C12 == c12 and C22 == c22 and C32 == c32:
                                for b3 in range(0, c3max - m + 1):
                                    C13 = a1 + b3
                                    C23 = a2 + b3
                                    C33 = a3 + b3
                                    if C13 == c13 and C23 == c23 and C33 == c33:
                                        print("Yes")
                                        return
    print("No")
    return


if __name__ == "__main__":
    main()

def main():
    c11, c12, c13 = list(map(int, input().split()))
    c21, c22, c23 = list(map(int, input().split()))
    c31, c32, c33 = list(map(int, input().split()))
    r1max = max([c11, c12, c13])
    r2max = max([c21, c22, c23])
    r3max = max([c31, c32, c33])
    c1max = max([c11, c21, c31])
    c2max = max([c12, c22, c32])
    c3max = max([c13, c23, c33])
    for a1 in range(0, r1max + 1):
        for a2 in range(0, r2max + 1):
            for a3 in range(0, r3max + 1):
                m = max([a1, a2, a3])
                for b1 in range(0, c1max - m + 1):
                    if a1 + b1 == c11 and a2 + b1 == c21 and a3 + b1 == c31:
                        for b2 in range(0, c2max - m + 1):
                            if a1 + b2 == c12 and a2 + b2 == c22 and a3 + b2 == c32:
                                for b3 in range(0, c3max - m + 1):
                                    if (
                                        a1 + b3 == c13
                                        and a2 + b3 == c23
                                        and a3 + b3 == c33
                                    ):
                                        print("Yes")
                                        return
    print("No")
    return


if __name__ == "__main__":
    main()

-                    C11 = a1 + b1 -                    C21 = a2 + b1 -                    C31 = a3 + b1 -                    if C11 == c11 and C21 == c21 and C31 == c31: +                    if a1 + b1 == c11 and a2 + b1 == c21 and a3 + b1 == c31: -                            C12 = a1 + b2 -                            C22 = a2 + b2 -                            C32 = a3 + b2 -                            if C12 == c12 and C22 == c22 and C32 == c32: +                            if a1 + b2 == c12 and a2 + b2 == c22 and a3 + b2 == c32: -                                    C13 = a1 + b3 -                                    C23 = a2 + b3 -                                    C33 = a3 + b3 -                                    if C13 == c13 and C23 == c23 and C33 == c33: +                                    if ( +                                        a1 + b3 == c13 +                                        and a2 + b3 == c23 +                                        and a3 + b3 == c33 +                                    ):