def confirm(a, b, c):

    for i in range(3):

        for j in range(3):

            if a[i] + b[j] != c[i][j]:

                return False

    return True





def main():

    c = [list(map(int, input().split())) for i in range(3)]



    for a1 in range(101):

        for a2 in range(101):

            for a3 in range(101):

                a = (a1, a2, a3)

                b = (c[0][0] - a1, c[0][1] - a1, c[0][2] - a1)

                if confirm(a, b, c):

                    return 'Yes'

    return 'No'





if __name__ == '__main__':

    ans = main()

    print(ans)

def main():

    c = [list(map(int, input().split())) for i in range(3)]

    for x in range(101):

        b = (c[0][0] - x, c[0][1] - x, c[0][2] - x)

        a = (x, c[1][0] - b[0], c[2][0] - b[0])

        flag = True

        for i in (1, 2):

            for j in (1, 2):

                if a[i] + b[j] != c[i][j]:

                    flag = False

        if flag:

            return 'Yes'

    return 'No'



  

if __name__ == "__main__":

    print((main()))

def confirm(a, b, c):
    for i in range(3):
        for j in range(3):
            if a[i] + b[j] != c[i][j]:
                return False
    return True


def main():
    c = [list(map(int, input().split())) for i in range(3)]
    for a1 in range(101):
        for a2 in range(101):
            for a3 in range(101):
                a = (a1, a2, a3)
                b = (c[0][0] - a1, c[0][1] - a1, c[0][2] - a1)
                if confirm(a, b, c):
                    return "Yes"
    return "No"


if __name__ == "__main__":
    ans = main()
    print(ans)

def main():
    c = [list(map(int, input().split())) for i in range(3)]
    for x in range(101):
        b = (c[0][0] - x, c[0][1] - x, c[0][2] - x)
        a = (x, c[1][0] - b[0], c[2][0] - b[0])
        flag = True
        for i in (1, 2):
            for j in (1, 2):
                if a[i] + b[j] != c[i][j]:
                    flag = False
        if flag:
            return "Yes"
    return "No"


if __name__ == "__main__":
    print((main()))

-def confirm(a, b, c): -    for i in range(3): -        for j in range(3): -            if a[i] + b[j] != c[i][j]: -                return False -    return True - - -    for a1 in range(101): -        for a2 in range(101): -            for a3 in range(101): -                a = (a1, a2, a3) -                b = (c[0][0] - a1, c[0][1] - a1, c[0][2] - a1) -                if confirm(a, b, c): -                    return "Yes" +    for x in range(101): +        b = (c[0][0] - x, c[0][1] - x, c[0][2] - x) +        a = (x, c[1][0] - b[0], c[2][0] - b[0]) +        flag = True +        for i in (1, 2): +            for j in (1, 2): +                if a[i] + b[j] != c[i][j]: +                    flag = False +        if flag: +            return "Yes" -    ans = main() -    print(ans) +    print((main()))