import numpy as np



lst = [[int(i) for i in input().split()] for _ in range(3)]

arr = np.array(lst)

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

  print('Yes')

else:

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

lst1 = [lst[1][i] - lst[0][i] for i in range(3)]

lst2 = [lst[2][i] - lst[0][i] for i in range(3)]

if len(set(lst1)) == 1 and len(set(lst2)) == 1:

  print('Yes')

else:

  print('No')
import numpy as np

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

lst = [[int(i) for i in input().split()] for _ in range(3)]
lst1 = [lst[1][i] - lst[0][i] for i in range(3)]
lst2 = [lst[2][i] - lst[0][i] for i in range(3)]
if len(set(lst1)) == 1 and len(set(lst2)) == 1:
    print("Yes")
else:
    print("No")

-import numpy as np - -arr = np.array(lst) -if len(set(arr[1, :] - arr[0, :])) == 1 and len(set(arr[2, :] - arr[0, :])) == 1: +lst1 = [lst[1][i] - lst[0][i] for i in range(3)] +lst2 = [lst[2][i] - lst[0][i] for i in range(3)] +if len(set(lst1)) == 1 and len(set(lst2)) == 1: