def main():

    import numpy as np

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

    f = [[x[0] - x[1], x[1] - x[2], x[2] - x[0]] for x in c]

    g = f[0] == f[1] == f[2]

    print(('Yes' if g else 'No'))





if __name__ == '__main__':

    main()

def main():

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

    f = [[x[0] - x[1], x[1] - x[2], x[2] - x[0]] for x in c]

    g = f[0] == f[1] == f[2]

    print(('Yes' if g else 'No'))





if __name__ == '__main__':

    main()

def main():
    import numpy as np

    c = [list(map(int, input().split())) for _ in range(3)]
    f = [[x[0] - x[1], x[1] - x[2], x[2] - x[0]] for x in c]
    g = f[0] == f[1] == f[2]
    print(("Yes" if g else "No"))


if __name__ == "__main__":
    main()

def main():
    c = [list(map(int, input().split())) for _ in range(3)]
    f = [[x[0] - x[1], x[1] - x[2], x[2] - x[0]] for x in c]
    g = f[0] == f[1] == f[2]
    print(("Yes" if g else "No"))


if __name__ == "__main__":
    main()

-    import numpy as np -