import sys

input = sys.stdin.readline



c = [[int(x) for x in input().split()] for _ in range(3)]



for i in range(101):

    for j in range(101):

        for k in range(101):

            b1, b2, b3 = [x - i for x in c[0]]

            if [b1 + j, b2 + j, b3 + j] == c[1] and [b1 + k, b2 + k, b3 + k] == c[2]:

                print("Yes")

                sys.exit()

print("No")



import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")



c = [[int(x) for x in input().split()] for _ in range(3)]



flag = 1



for a1 in range(101):

    for a2 in range(101):

        for a3 in range(101):

            if c[0][0] - a1 == c[1][0] - a2 and c[1][0] - a2 == c[2][0] - a3:

                if c[0][1] - a1 == c[1][1] - a2 and c[1][1] - a2 == c[2][1] - a3:

                    if c[0][2] - a1 == c[1][2] - a2 and c[1][2] - a2 == c[2][2] - a3:

                        flag = 0



if flag:

    print('No')

else:

    print('Yes')



import sys

input = sys.stdin.readline
c = [[int(x) for x in input().split()] for _ in range(3)]
for i in range(101):
    for j in range(101):
        for k in range(101):
            b1, b2, b3 = [x - i for x in c[0]]
            if [b1 + j, b2 + j, b3 + j] == c[1] and [b1 + k, b2 + k, b3 + k] == c[2]:
                print("Yes")
                sys.exit()
print("No")

import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")
c = [[int(x) for x in input().split()] for _ in range(3)]
flag = 1
for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            if c[0][0] - a1 == c[1][0] - a2 and c[1][0] - a2 == c[2][0] - a3:
                if c[0][1] - a1 == c[1][1] - a2 and c[1][1] - a2 == c[2][1] - a3:
                    if c[0][2] - a1 == c[1][2] - a2 and c[1][2] - a2 == c[2][2] - a3:
                        flag = 0
if flag:
    print("No")
else:
    print("Yes")

-input = sys.stdin.readline +input = lambda: sys.stdin.readline().rstrip("\r\n") -for i in range(101): -    for j in range(101): -        for k in range(101): -            b1, b2, b3 = [x - i for x in c[0]] -            if [b1 + j, b2 + j, b3 + j] == c[1] and [b1 + k, b2 + k, b3 + k] == c[2]: -                print("Yes") -                sys.exit() -print("No") +flag = 1 +for a1 in range(101): +    for a2 in range(101): +        for a3 in range(101): +            if c[0][0] - a1 == c[1][0] - a2 and c[1][0] - a2 == c[2][0] - a3: +                if c[0][1] - a1 == c[1][1] - a2 and c[1][1] - a2 == c[2][1] - a3: +                    if c[0][2] - a1 == c[1][2] - a2 and c[1][2] - a2 == c[2][2] - a3: +                        flag = 0 +if flag: +    print("No") +else: +    print("Yes")