lis1 = []

lis2 = []

lis3 = []

count = 0

for num in input().split():

    lis1.append(int(num))

for num in input().split():

    lis2.append(int(num))

for num in input().split():

    lis3.append(int(num))

for a1 in range(101):

    for a2 in range(101):

        for a3 in range(101):

            count = 0

            if lis1[0] - a1 == lis2[0] - a2 == lis3[0] - a3:

                count += 1

            if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3:

                count += 1

            if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3:

                count += 1

            if count == 3:

                print("Yes")

                break

        if count == 3:

          	break

    if count == 3:

      break

    if a1 == 100 and count != 3:

      	print("No")
lis1 = []

lis2 = []

lis3 = []

count = 0

flag = 0

for num in input().split():

    lis1.append(int(num))

for num in input().split():

    lis2.append(int(num))

for num in input().split():

    lis3.append(int(num))

for a1 in range(101):

    for a2 in range(101):

        for a3 in range(101):

            if lis1[0] - a1 == lis2[0] - a2 == lis3[0] - a3:

        	    if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3:

		            if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3:

             	 		print("Yes")

             	 		flag = 1

             	 		break

        if flag == 1:

            break

    if flag == 1:

        break

    if a1 == 100 and flag == 0:

      	print("No")
lis1 = []
lis2 = []
lis3 = []
count = 0
for num in input().split():
    lis1.append(int(num))
for num in input().split():
    lis2.append(int(num))
for num in input().split():
    lis3.append(int(num))
for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            count = 0
            if lis1[0] - a1 == lis2[0] - a2 == lis3[0] - a3:
                count += 1
            if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3:
                count += 1
            if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3:
                count += 1
            if count == 3:
                print("Yes")
                break
        if count == 3:
            break
    if count == 3:
        break
    if a1 == 100 and count != 3:
        print("No")

lis1 = []
lis2 = []
lis3 = []
count = 0
flag = 0
for num in input().split():
    lis1.append(int(num))
for num in input().split():
    lis2.append(int(num))
for num in input().split():
    lis3.append(int(num))
for a1 in range(101):
    for a2 in range(101):
        for a3 in range(101):
            if lis1[0] - a1 == lis2[0] - a2 == lis3[0] - a3:
                if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3:
                    if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3:
                        print("Yes")
                        flag = 1
                        break
        if flag == 1:
            break
    if flag == 1:
        break
    if a1 == 100 and flag == 0:
        print("No")

+flag = 0 -            count = 0 -                count += 1 -            if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3: -                count += 1 -            if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3: -                count += 1 -            if count == 3: -                print("Yes") -                break -        if count == 3: +                if lis1[1] - a1 == lis2[1] - a2 == lis3[1] - a3: +                    if lis1[2] - a1 == lis2[2] - a2 == lis3[2] - a3: +                        print("Yes") +                        flag = 1 +                        break +        if flag == 1: -    if count == 3: +    if flag == 1: -    if a1 == 100 and count != 3: +    if a1 == 100 and flag == 0: