output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: A = [list(map(int, input().strip().split())) for n in range(3)]
  A_input = []
  for n in range(3):
      for m in range(3):
          A_input.append(A[n][m])
  N = int(input())
  b = [int(input()) for n in range(N)]
  
  
  def bingo_judge(A_input, b):
      bingo = 0
      judge_list = [0, 0, 0, 0, 0, 0, 0, 0, 0]
      for number in b:
          for i in range(9):
              if number == A_input[i]:
                  judge_list[i] = 1
              else:
                  pass
      # horizonal
      for i in range(3):
          if judge_list[3 * i] * judge_list[3 * i + 1] * judge_list[3 * i + 2] == 1:
              bingo = 1
          else:
              pass
      # vertical
      for i in range(3):
          if judge_list[i] * judge_list[i + 3] * judge_list[i + 6] == 1:
              bingo = 1
          else:
              pass
      # diagonal
      if judge_list[0] * judge_list[4] * judge_list[8] == 1:
          bingo = 1
      if judge_list[2] * judge_list[4] * judge_list[6] == 1:
          bingo = 1
      # test display
      # judge_disp=[[judge_list[i+3*n] for i in range(3)] for n in range(3)]
      # print(*judge_disp,sep="\n")
  
      return bingo
  
  
  def main():
      ans = bingo_judge(A_input, b)
      if ans == 1:
          print("yes")
      elif ans == 0:
          print("No")
  
  
  main()
  
problem_description: Statement
  
  Takahashi wants to print a document with N pages double-sided, where two pages
  of data can be printed on one sheet of paper.
  
  At least how many sheets of paper does he need?
samples: [{"input": "5", "output": "3\n    \n\nBy printing the 1-st, 2-nd pages on the 1-st sheet, 3-rd and 4-th pages on the\n2-nd sheet, and 5-th page on the 3-rd sheet, we can print all the data on 3\nsheets of paper.\n\n* * *"}, {"input": "2", "output": "1\n    \n\n* * *"}, {"input": "100", "output": "50"}]