output_description: If Takahashi's statement is correct, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      c_{1,1} c_{1,2} c_{1,3}
      c_{2,1} c_{2,2} c_{2,3}
      c_{3,1} c_{3,2} c_{3,3}
attempt: # coding: utf-8
  import re
  import math
  from collections import defaultdict
  from collections import deque
  import itertools
  from copy import deepcopy
  import random
  import time
  import os
  import queue
  import sys
  import datetime
  from functools import lru_cache
  
  # @lru_cache(maxsize=None)
  readline = sys.stdin.readline
  sys.setrecursionlimit(2000000)
  # import numpy as np
  alphabet = "abcdefghijklmnopqrstuvwxyz"
  mod = int(10**9 + 7)
  inf = int(10**20)
  
  
  def yn(b):
      if b:
          print("yes")
      else:
          print("no")
  
  
  def Yn(b):
      if b:
          print("Yes")
      else:
          print("No")
  
  
  def YN(b):
      if b:
          print("YES")
      else:
          print("NO")
  
  
  class union_find:
      def __init__(self, n):
          self.n = n
          self.P = [a for a in range(N)]
          self.rank = [0] * n
  
      def find(self, x):
          if x != self.P[x]:
              self.P[x] = self.find(self.P[x])
          return self.P[x]
  
      def same(self, x, y):
          return self.find(x) == self.find(y)
  
      def link(self, x, y):
          if self.rank[x] < self.rank[y]:
              self.P[x] = y
          elif self.rank[y] < self.rank[x]:
              self.P[y] = x
          else:
              self.P[x] = y
              self.rank[y] += 1
  
      def unite(self, x, y):
          self.link(self.find(x), self.find(y))
  
      def size(self):
          S = set()
          for a in range(self.n):
              S.add(self.find(a))
          return len(S)
  
  
  def is_pow(a, b):  # aはbの累乗数か
      now = b
      while now < a:
          now *= b
      if now == a:
          return True
      else:
          return False
  
  
  def bin_(num, size):
      A = [0] * size
      for a in range(size):
          if (num >> (size - a - 1)) & 1 == 1:
              A[a] = 1
          else:
              A[a] = 0
      return A
  
  
  def get_facs(n, mod_=0):
      A = [1] * (n + 1)
      for a in range(2, len(A)):
          A[a] = A[a - 1] * a
          if mod_ > 0:
              A[a] %= mod_
      return A
  
  
  def comb(n, r, mod, fac):
      if n - r < 0:
          return 0
      return (fac[n] * pow(fac[n - r], mod - 2, mod) * pow(fac[r], mod - 2, mod)) % mod
  
  
  def next_comb(num, size):
      x = num & (-num)
      y = num + x
      z = num & (~y)
      z //= x
      z = z >> 1
      num = y | z
      if num >= (1 << size):
          return False
      else:
          return num
  
  
  def get_primes(n, type="int"):
      if n == 0:
          if type == "int":
              return []
          else:
              return [False]
      A = [True] * (n + 1)
      A[0] = False
      A[1] = False
      for a in range(2, n + 1):
          if A[a]:
              for b in range(a * 2, n + 1, a):
                  A[b] = False
      if type == "bool":
          return A
      B = []
      for a in range(n + 1):
          if A[a]:
              B.append(a)
      return B
  
  
  def is_prime(num):
      if num <= 1:
          return False
      i = 2
      while i * i <= num:
          if num % i == 0:
              return False
          i += 1
      return True
  
  
  def ifelse(a, b, c):
      if a:
          return b
      else:
          return c
  
  
  def join(A, c=""):
      n = len(A)
      A = list(map(str, A))
      s = ""
      for a in range(n):
          s += A[a]
          if a < n - 1:
              s += c
      return s
  
  
  def factorize(n, type_="dict"):
      b = 2
      list_ = []
      while b * b <= n:
          while n % b == 0:
              n //= b
              list_.append(b)
          b += 1
      if n > 1:
          list_.append(n)
      if type_ == "dict":
          dic = {}
          for a in list_:
              if a in dic:
                  dic[a] += 1
              else:
                  dic[a] = 1
          return dic
      elif type_ == "list":
          return list_
      else:
          return None
  
  
  def floor_(n, x=1):
      return x * (n // x)
  
  
  def ceil_(n, x=1):
      return x * ((n + x - 1) // x)
      return ret
  
  
  def seifu(x):
      return x // abs(x)
  
  
  ######################################################################################################
  def main():
      C = [list(map(int, input().split())) for a in range(3)]
      A = [0] * 3
      B = [C[0][0], C[0][1], C[0][2]] * 3
      for a in range(1, 3):
          A[a] = C[a][0] - B[0]
      f = True
      for a in range(3):
          for b in range(3):
              if A[a] + B[b] != C[a][b]:
                  f = False
      Yn(f)
  
  
  main()
  
problem_description: Statement
  
  We have a 3 \times 3 grid. A number c_{i, j} is written in the square (i, j),
  where (i, j) denotes the square at the i-th row from the top and the j-th
  column from the left.  
  According to Takahashi, there are six integers a_1, a_2, a_3, b_1, b_2, b_3
  whose values are fixed, and the number written in the square (i, j) is equal
  to a_i + b_j.  
  Determine if he is correct.
samples: [{"input": "1 0 1\n    2 1 2\n    1 0 1", "output": "Yes\n    \n\nTakahashi is correct, since there are possible sets of integers such as:\na_1=0,a_2=1,a_3=0,b_1=1,b_2=0,b_3=1.\n\n* * *"}, {"input": "2 2 2\n    2 1 2\n    2 2 2", "output": "No\n    \n\nTakahashi is incorrect in this case.\n\n* * *"}, {"input": "0 8 8\n    0 8 8\n    0 8 8", "output": "Yes\n    \n\n* * *"}, {"input": "1 8 6\n    2 9 7\n    0 7 7", "output": "No"}]