import numpy as np



c = [[], [], []]

for i in range(3):

    c[i] = list(map(int, input().split()))

d = np.array(c)



if len(set(d[1]-d[0])) == 1 and len(set(d[2]-d[0])) == 1:

    print('Yes')

else:

    print('No')
c = [[int(i) for i in input().split()] for i in range(3)]



for a1 in range(101):

    b1 = c[0][0] - a1

    b2 = c[0][1] - a1

    b3 = c[0][2] - a1

    if 0 <= b1 <= 100 or 0 <= b2 <= 100 or 0 <= b3 <= 100:

        if c[1][0] - b1 == c[1][1] - b2 == c[1][2] -b3 and 0<=c[1][0] <= 100 and c[2][0] - b1 == c[2][1] - b2 == c[2][2] -b3 and 0<=c[2][0] <= 100:

            print('Yes')

            break

else:

    print('No')
import numpy as np

c = [[], [], []]
for i in range(3):
    c[i] = list(map(int, input().split()))
d = np.array(c)
if len(set(d[1] - d[0])) == 1 and len(set(d[2] - d[0])) == 1:
    print("Yes")
else:
    print("No")

c = [[int(i) for i in input().split()] for i in range(3)]
for a1 in range(101):
    b1 = c[0][0] - a1
    b2 = c[0][1] - a1
    b3 = c[0][2] - a1
    if 0 <= b1 <= 100 or 0 <= b2 <= 100 or 0 <= b3 <= 100:
        if (
            c[1][0] - b1 == c[1][1] - b2 == c[1][2] - b3
            and 0 <= c[1][0] <= 100
            and c[2][0] - b1 == c[2][1] - b2 == c[2][2] - b3
            and 0 <= c[2][0] <= 100
        ):
            print("Yes")
            break
else:
    print("No")

-import numpy as np - -c = [[], [], []] -for i in range(3): -    c[i] = list(map(int, input().split())) -d = np.array(c) -if len(set(d[1] - d[0])) == 1 and len(set(d[2] - d[0])) == 1: -    print("Yes") +c = [[int(i) for i in input().split()] for i in range(3)] +for a1 in range(101): +    b1 = c[0][0] - a1 +    b2 = c[0][1] - a1 +    b3 = c[0][2] - a1 +    if 0 <= b1 <= 100 or 0 <= b2 <= 100 or 0 <= b3 <= 100: +        if ( +            c[1][0] - b1 == c[1][1] - b2 == c[1][2] - b3 +            and 0 <= c[1][0] <= 100 +            and c[2][0] - b1 == c[2][1] - b2 == c[2][2] - b3 +            and 0 <= c[2][0] <= 100 +        ): +            print("Yes") +            break