output_description: If we will have a bingo, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A_{1, 1} A_{1, 2} A_{1, 3}
      A_{2, 1} A_{2, 2} A_{2, 3}
      A_{3, 1} A_{3, 2} A_{3, 3}
      N
      b_1
      \vdots
      b_N
attempt: def row_sums(B):
      return sum(B[0]) == 0 or sum(B[1]) == 0 or sum(B[2]) == 0
  
  
  def diagonal_sum(M):
      i, j = -1, -1
      sums = 0
      for _ in range(3):
          i += 1
          j += 1
          sums += M[i][j]
      return sums == 0
  
  
  def column_sum(M):
      columns = list(zip(*M))
      return row_sums(columns)
  
  
  has = [[int(x) for x in input().split()] for _ in range(3)]
  calls = int(input())
  for _ in range(calls):
      current = int(input())
      for i in range(3):
          if current in has[i]:
              has[i][has[i].index(current)] = 0
  # print(has)
  """
  if row_sums(has) or column_sum(has) or diagonal_sum(has):
      print('Yes')
  else:print('No')
  """
  answer = "NO"
  for i in range(3):
      if has[i][0] == has[i][1] == has[i][2] == 0:
          ans = "Yes"
      if has[0][i] == has[1][i] == has[2][i] == 0:
          ans = "Yes"
  if has[0][0] == has[1][1] == has[2][2] == 0:
      ans = "Yes"
  if has[2][0] == has[1][1] == has[0][2] == 0:
      ans = "Yes"
  print(answer)
  
problem_description: Statement
  
  We have a bingo card with a 3\times3 grid. The square at the i-th row from the
  top and the j-th column from the left contains the number A_{i, j}.
  
  The MC will choose N numbers, b_1, b_2, \cdots, b_N. If our bingo sheet
  contains some of those numbers, we will mark them on our sheet.
  
  Determine whether we will have a bingo when the N numbers are chosen, that is,
  the sheet will contain three marked numbers in a row, column, or diagonal.
samples: [{"input": "84 97 66\n    79 89 11\n    61 59 7\n    7\n    89\n    7\n    87\n    79\n    24\n    84\n    30", "output": "Yes\n    \n\nWe will mark A_{1, 1}, A_{2, 1}, A_{2, 2}, A_{3, 3}, and complete the diagonal\nfrom the top-left to the bottom-right.\n\n* * *"}, {"input": "41 7 46\n    26 89 2\n    78 92 8\n    5\n    6\n    45\n    16\n    57\n    17", "output": "No\n    \n\nWe will mark nothing.\n\n* * *"}, {"input": "60 88 34\n    92 41 43\n    65 73 48\n    10\n    60\n    43\n    88\n    11\n    48\n    73\n    65\n    41\n    92\n    34", "output": "Yes\n    \n\nWe will mark all the squares."}]