output_description: Print `YES` if this grid remains the same when rotated 180 degrees; print `NO`
  otherwise.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      C_{11}C_{12}C_{13}
      C_{21}C_{22}C_{23}
attempt: def main():
      num = int(input())
      data_a = list(map(int, input().split()))
      data_a.sort()
      data_b = list(map(int, input().split()))
      data_b.sort()
      data_c = list(map(int, input().split()))
      data_c.sort()
  
      shita_b = [0 for i in range(num)]
  
      ind = 0
      for i in range(num):
          now_b = data_b[i]
          while data_c[ind] <= now_b:
              ind += 1
              if ind >= num:
                  ind = num
                  break
          if ind == num:
              break
          shita_b[i] = num - ind
  
      ans = 0
      tasu_now = sum(shita_b)
      ind = 0
      for i in range(num):
          now_a = data_a[i]
          while now_a >= data_b[ind]:
              tasu_now -= shita_b[ind]
              ind += 1
              if ind >= num:
                  ind = num
                  break
          if ind == num:
              break
          ans += tasu_now
  
      print(ans)
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  You are given a grid with 2 rows and 3 columns of squares. The color of the
  square at the i-th row and j-th column is represented by the character C_{ij}.
  
  Write a program that prints `YES` if this grid remains the same when rotated
  180 degrees, and prints `NO` otherwise.
samples: [{"input": "pot\n    top", "output": "YES\n    \n\nThis grid remains the same when rotated 180 degrees.\n\n* * *"}, {"input": "tab\n    bet", "output": "NO\n    \n\nThis grid does not remain the same when rotated 180 degrees.\n\n* * *"}, {"input": "eye\n    eel", "output": "NO"}]