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: import sys, collections as cl, bisect as bs
  
  sys.setrecursionlimit(100000)
  input = sys.stdin.readline
  mod = 10**9 + 7
  Max = sys.maxsize
  
  
  def l():  # intのlist
      return list(map(int, input().split()))
  
  
  def m():  # 複数文字
      return map(int, input().split())
  
  
  def onem():  # Nとかの取得
      return int(input())
  
  
  def s(x):  # 圧縮
      a = []
      if len(x) == 0:
          return []
      aa = x[0]
      su = 1
      for i in range(len(x) - 1):
          if aa != x[i + 1]:
              a.append([aa, su])
              aa = x[i + 1]
              su = 1
          else:
              su += 1
      a.append([aa, su])
      return a
  
  
  def jo(x):  # listをスペースごとに分ける
      return " ".join(map(str, x))
  
  
  def max2(x):  # 他のときもどうように作成可能
      return max(map(max, x))
  
  
  def In(x, a):  # aがリスト(sorted)
      k = bs.bisect_left(a, x)
      if k != len(a) and a[k] == x:
          return True
      else:
          return False
  
  
  def pow_k(x, n):
      ans = 1
      while n:
          if n % 2:
              ans *= x
          x *= x
          n >>= 1
      return ans
  
  
  """
  def nibu(x,n,r):
      ll = 0
      rr = r
      while True:
          mid = (ll+rr)//2
  
      if rr == mid:
          return ll
      if (ここに評価入れる):
          rr = mid
      else:
          ll = mid+1
  """
  
  s = [list(input())[:-1] for i in range(2)]
  
  for i in range(3):
      if s[0][i] != s[1][2 - i]:
          print("NO")
  else:
      print("YES")
  
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"}]