Problem:
 Score : 100 points    Problem 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.      Constraints  C_{i,j}(1 \leq i \leq 2, 1 \leq j \leq 3) is a lowercase English letter.         Input Input is given from Standard Input in the following format:  C_{11}C_{12}C_{13}  C_{21}C_{22}C_{23}       Output Print YES if this grid remains the same when rotated 180 degrees; print NO otherwise.        Sample Input 1 pot
top      Sample Output 1 YES  This grid remains the same when rotated 180 degrees.       Sample Input 2 tab
bet      Sample Output 2 NO  This grid does not remain the same when rotated 180 degrees.       Sample Input 3 eye
eel      Sample Output 3 NO

Solution (Python):
A = input()
B = input()
if A == B[::-1]:
  r = 'YES'
else:
  r = 'NO'
print(r)

Solution (Python):
s1 = input()
s2 = input()

if s1 == s2[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
a = input()
b = input()

if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a = input()
b = input()
print('YES' if a == b[::-1] else 'NO')

Solution (Python):
line1 = input()
line2 = input()

if line1[0] == line2[2] and line2[0] == line1[2] and line1[1] == line2[1]:
    print("YES")
else:
    print("NO")

Solution (Python):
S1 = input().strip()
S2 = input().strip()

if S1[::-1] == S2:
  print("YES")
else:
  print("NO")

Solution (Python):
c_1=input()
c_2=input()
if c_1 == c_2[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
n1 = input()
n2 = input()

ans = ''

for i, ch in enumerate(reversed(n1)):
    ans += ch

if (n2 == ans):
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(input())
b = list(input())
b.reverse()
if a == b:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = input()
c2 = input()

if( c1[0] == c2[2] and c1[2] == c2[0] and c1[1] == c2[1]):
  print("YES")
  
else:
  print("NO")

Solution (Python):
s1 = input()
s2 = input()

if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
import sys
input = sys.stdin.readline
c1 = input().strip()
c2 = input().strip()
flag = True
for i in range(3):
    if c1[i] != c2[-(i+1)]:
        flag = False
        break
if flag:
    print("YES")
else:
    print("NO")

Solution (Python):
s=[input() for _ in range(2)]
if s[0][0]==s[1][2] and s[0][1]==s[1][1] and s[0][2]==s[1][0]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = input()
c2 = input()
print("YES" if c1[0] == c2[-1] and c1[1] ==
      c2[-2] and c1[2] == c2[-3] else "NO")

Solution (Python):
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): 
    return a/gcd(a,b)*b

def divisors(a): 
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): 
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    c1 = input()
    c2 = input()
    for i in range(3):
        if c1[i]!=c2[-1-i]:
            print('NO')
            return
    print('YES')
    return

if __name__=='__main__':
    main()

Solution (Python):
s1 = input()
s2 = input()[::-1]

if s1==s2:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b,c=input()
d,e,f=input()
if a==f and b==e and c==d:
    print("YES")
else: print("NO")

Solution (Python):
s=input()
t=input()
print('YNEOS'[s!=t[::-1]::2])

Solution (Python):
c1 = input()
c2 = input()
if c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
if a==b[::-1]: print('YES')
else:print('NO')

Solution (Python):
N =input()
L =input()
if (N[0]==L[2])and(N[1]==L[1])and(N[2]==L[0]):
    print("YES")
else:
    print("NO")

Solution (Python):
C1=input()
C2=input()
print('YES' if C1==C2[2]+C2[1]+C2[0] else 'NO')

Solution (Python):
a = input()
b = input()

if a[::-1] == b:
  print("YES")
else:
  print("NO")

Solution (Python):
c1 = input()
c2 = input()
print("YES") if(c1[::-1] == c2) else print("NO")

Solution (Python):
C1 = input()
C2 = input()
ans = 'NO'
if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]: ans = 'YES'
print(ans)

Solution (Python):
s = input()
t = input()
print("YES" if s == t[::-1] else "NO")

Solution (Python):
a = input()
b = input()
if a == b[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys
input = sys.stdin.readline
C = []
for _ in range(2):
    C.append(list(input()))
if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = input()
c2 = input()

if c1 == c2[2]+c2[1]+c2[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
a = list(input())
b = list(input())


if a == list(reversed(b)):
    print("YES")
else:
    print("NO")

Solution (Python):
c1=input()
c2=input()
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
print("YES" if list(input())==list(reversed(list(input()))) else "NO")

Solution (Python):
c = [list(str(input())) for _ in range(2)]
for i in range(3):
    if c[0][i] != c[1][-i-1]:
        print('NO')
        exit(0)
print('YES')

Solution (Python):
print("YES" if input()==input()[::-1] else "NO")

Solution (Python):
c = []
for i in range(2):
   c.append(input())

for i in range(3):
   if (c[0][i] != c[1][-(i+1)]):
      print('NO')
      exit()

print('YES')

Solution (Python):
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a = list(input())
b = list(input())
b.reverse()
print('YES' if a == b else 'NO')

Solution (Python):
A=input()
B=input()
print("YES" if A==B[::-1] else "NO")

Solution (Python):
s = [input() for i in range(2)]
if s[0][0] == s[1][2] and s[0][1] == s[1][1] and s[0][2] == s[1][0]:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys
C = []
D = []

for _ in range(2):
    l = list(input())
    C.append(l)

count = 0
for i in range(1,-1,-1):
    D.append([])
    for j in range(2,-1,-1):
        D[count].append(C[i][j])

    count = count + 1
for i in range(2):
    for j in range(3):
        if C[i][j]!=D[i][j]:
            print("NO")
            sys.exit()
print("YES")

Solution (Python):
s = [input() for i in range(2)]
print('YES' if s[0] == s[1][::-1] else 'NO')

Solution (Python):
c=[input() for i in range(2)]
ans="YES"
for i in range(3):
    if c[0][i]!=c[1][2-i]:
        ans="NO"
print(ans)

Solution (Python):
print("YES" if input() == input()[::-1] else "NO")

Solution (Python):
a = input()
b = input()
print("YES" if a == b[::-1] else "NO")

Solution (Python):
s = input()
t = input()

if s==t[::-1] and t==s[::-1]:
  print('YES')
else:
  print('NO')

Solution (Python):
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
a = input()
b = input()
print("YES" if a == b[::-1] else "NO")

Solution (Python):
import sys

s1, s2 = sys.stdin.read().split()

def main():
    return 'YES' if s1[::-1] == s2 else 'NO'

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
C1 = input()
C2 = input()

if C1 == C2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
a = input()
s_list = ([i for i in s])
a_list = ([j for j in a])
a_list[0],a_list[2] = a_list[2],a_list[0]
if s_list == a_list:
    print("YES")
else:
    print("NO")

Solution (Python):
c0 = input()
c1 = input()

if c0[0]==c1[2] and c0[1]==c1[1] and c0[2]==c1[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input() + input()


if s[0] == s[5] and s[1] == s[4] and s[2] == s[3]:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
if a == b[::-1]:
  print("YES")
else:
  print("NO")

Solution (Python):
a = input()
b = input()
if a[::-1] == b:
    print('YES')
else:
    print('NO')

Solution (Python):
s = str(input())
t = str(input())
tmp = 0

for i in range(3):
    if s[i]==t[2-i]:
        tmp += 1

print('YES' if tmp == 3 else 'NO')

Solution (Python):
import math

a = input()
b = input()
print("YES" if a == b[::-1] else "NO")

Solution (Python):
S = list(input())
T = list(input())
ans = "NO"

if S[1] == T[1]:
  if S[0] == T[2] and S[2] == T[0]:
    ans = "YES"
print(ans)

Solution (Python):
import sys

x = input()
y = input()

if x == y[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys

x = [input() for _ in range(2)]

for i in range(3):
    flag = True
    if x[0][i] != x[1][2-i]:
        flag = False
        break

if flag:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(input())
b = list(input())
a[0], a[2] = a[2], a[0]
if b == a:
    print("YES")
else:
    print("NO")

Solution (Python):
if list(str(input())) == list(reversed(str(input()))) :
  print("YES")
else :
  print("NO")

Solution (Python):
S = input()
T = input()
if T[:: -1] == S:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()[::-1]
print('YES' if input()==a else 'NO')

Solution (Python):
a=input()[::-1]
x='YES' if input()==a else 'NO'
print(x)

Solution (Python):
s1 = str( input() )
s2 = str( input() )
s1r = s1[::-1]

print( [ "NO", "YES" ][ s1r == s2 ] )

Solution (Python):
a=input()
b=input()
c=a[::-1]
if c==b:
  print("YES")
else:
  print("NO")

Solution (Python):
s=input()
t=input()
if s==t[::-1]:
  print("YES")
else:
  print("NO")

Solution (Python):
s = input()
l = input()
if s[0] == l[2] and s[1] == l[1] and s[2] == l[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
c1 = input()
c2 = input()

print("YES" if c1 == c2[::-1] else "NO")

Solution (Python):
c = [list(input()) for _ in range(2)]
if c[0][0] == c[1][2] and c[0][1] == c[1][1] and c[0][2] == c[1][0]:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()
t = input()

if s[::-1] == t:
  print("YES")
else:
  print("NO")

Solution (Python):
c1 = input()
c2 = input()
 
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
a=input()
b=input()
if a==b[::-1]:
  print('YES')
else:
  print('NO')

Solution (Python):
s = input()
t = input()
print('YES' if s == t[::-1] else 'NO')

Solution (Python):
import sys
import bisect

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  

C1 = rs()
C2 = rs()
print('YES' if C1[::-1] == C2 else 'NO')

Solution (Python):
s = ''
for i in range(2):
    s += input()
if s == s[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
C1 = input()
C2 = input()

if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
s = str(input())
t = str(input())

if s[2]==t[0] and s[1]==t[1] and s[0]==t[2]:
    ans = 'YES'
else:
    ans = 'NO'

print(ans)

Solution (Python):
c1=list(input())
c2=list(input())
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
C_1 = list(input())
C_2 = list(input())
C_1.reverse()
print('YES') if C_1==C_2 else print('NO')

Solution (Python):
s = input()
l = input()
if s == l[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
b = input()

if a == b[::-1] and b == a[::-1]:
  print("YES")
else:
  print("NO")

Solution (Python):
a=input()
b=input()

if a=="{}{}{}".format(b[2],b[1],b[0]):
  print("YES")
else:
  print("NO")

Solution (Python):
l1=list(input())
l2=list(input())
if l1[0]==l2[2] and l1[1]==l2[1] and l1[2]==l2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
X = input()
Y = input()

if X == Y[::-1] and Y == X[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = list(input())
c2 = list(input())

c2.reverse()
if c1 == c2:
    print("YES")
else:
    print("NO")

Solution (Python):




a = list(input())
b = list(input())

if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
print(" YNEOS"[b[::-1]==a::2])

Solution (Python):
a = input()
b = input()

if a == b[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()
b=input()

if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
S=input()
if input()==S[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
b = input()
print('YES') if a == b[::-1] else print('NO')

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
	s1 = input()
	s2 = input()
	if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
		print('YES')
	else:
		print('NO')

if  __name__=='__main__':
	main()

Solution (Python):
A = input()
B = input()

REA = (A[0] + A[1] + A[2])
REB = (B[2] + B[1] +B[0])

if REA == REB:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print("YES")
else:
    print("NO")

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

print('YNEOS'[input()[:-1] != input()[:-1][::-1]::2])

Solution (Python):


import numpy as np

C=np.full((2,3),".",np.str)
C[0,:]=list(input())
C[1,:]=list(input())
Cr=np.rot90(C,k=2) 

if (C==Cr).all(): 
    print("YES")
else: 
    print("NO")

Solution (Python):
import sys


def main():
    C = [list(input()) for _ in range(2)]

    for i in range(3):
        if C[0][i] == C[1][2-i]:
            continue
        else:
            print('NO')
            sys.exit()

    else:
        print('YES')


main()

Solution (Python):
S=input()
T=input()
if (S[0]==T[2] and T[0]==S[2] and T[1]==S[1]):
  print("YES")
else:
  print("NO")

Solution (Python):
c1 = input()
c2 = input()

if c1 == c2[::-1]:
    ans = "YES"
else:
    ans = "NO"

print(ans)

Solution (Python):
top = input()
bot = input()
if top[:1]==bot[-1:] and top[-1:]==bot[:1] and top[1:2]==bot[1:2]:
    print("YES")
else:
    print("NO")

Solution (Python):
C1 = [i for i in input()]
C2 = [i for i in input()]
C2.reverse()
if C1 == C2:
    print("YES")
else:
    print("NO")

Solution (Python):
s1 = list(input())
s2 = list(input())

if s1 == s2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    s=input()
    t=input()
    if s==t[::-1]:print("YES")
    else:print("NO")

main()

Solution (Python):

import math


C1 = str(input())
C2 = str(input())
C3 = C2[2] + C2[1] + C2[0]

if C1 == C3 :
  print ("YES")
else :
  print ("NO")

Solution (Python):
if input() == input()[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
upper = list(input())
lower = list(input())
ans = "YES"
for i in range(3):
  if upper[i] != lower[-i-1]:
    ans = "NO"
print(ans)

Solution (Python):
x=input()
y=input()
print("YES" if x==y[::-1] else "NO")

Solution (Python):
n=input()
m=input()
if n[0]==m[2] and n[1]==m[1] and n[2]==m[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
from sys import stdin
import math
import bisect
import heapq
import numpy as np
from math import factorial

s = stdin.readline().rstrip()
t = stdin.readline().rstrip()

if s[::-1] == t:
    print("YES")
else:
    print("NO")

Solution (Python):
import numpy as np
arr = np.array(
  [
  	list(input().strip())
    for _ in range(2)
  ]
)

print("YES" if (arr == arr[::-1,::-1]).all() else "NO")

Solution (Python):
c1 = list(input())
c2 = list(input())
if c1 == c2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
ls_c = [[i for i in input()] for j in range(2)]

if (ls_c[0][0] == ls_c[1][2]) and (ls_c[0][2] == ls_c[1][0]) and (ls_c[0][1] == ls_c[1][1]):
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
t = input()
if s==t[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
def examA():
    C = [S() for _ in range(2)]
    if C[0][0]==C[1][2] and C[0][1]==C[1][1] and C[0][2]==C[1][0]:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)

import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

Solution (Python):
a=input()
b=input()
print("YES" if a[::-1]==b else "NO")

Solution (Python):
from sys import stdin
s1 = (stdin.readline().rstrip())
s2 = (stdin.readline().rstrip())
if s1 == s2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = input()
c2 = input()
call = c1 + c2
callrotated = call[::-1]
if call == callrotated :
    print("YES")
else :
    print("NO")

Solution (Python):

Cone = str(input())
Ctwo = str(input())

if Cone[0]==Ctwo[2] and Cone[1]==Ctwo[1] and Cone[2]==Ctwo[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
S1 = str(input())
S2 = str(input())

S1 = S1[::-1]


if S1 == S2:
  print("YES")
else:
  print("NO")

Solution (Python):
s = [input() for i in range(2)]
if s[0][0] == s[1][2] and s[0][1] == s[1][1] and s[1][0] == s[0][2]:
  print("YES")
else:
  print("NO")

Solution (Python):
print("YES" if input() == input()[::-1] else "NO")

Solution (Python):
a=str(input()) 
b=str(input())
if a==b[::-1] and b==a[::-1]:
    print("YES")
else:
    print('NO')

Solution (Python):
print('YES' if input()==input()[::-1] else 'NO')

Solution (Python):
a = input()
b = input()

c = list(a)
d = list(b)

if c[0]==d[2] and c[1]==d[1] and c[2]==d[0]:
	print('YES')
else:
	print('NO')

Solution (Python):
s = input()
t = input()
reversed_s = s[::-1]
if reversed_s == t:
    print("YES")
else:print("NO")

Solution (Python):
C = []
for i in range(2):
  C.append(list(input()))
 
if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0]:
  print('YES')
else:
  print('NO')

Solution (Python):
a=list(input())
b=list(input())

b.reverse()
if a==b:
  print("YES")
else:
  print("NO")

Solution (Python):
print('YES' if input() == ''.join([s for s in input()[::-1]]) else 'NO')

Solution (Python):
a = list(map(str, input()))
b = list(map(str, input()))
if a[0] == b [2] and a[1] == b[1] and a[2] == b[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=str(input())
b=str(input())
print('YES' if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else 'NO')

Solution (Python):
s = input()
t = input()
if s == t[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
s=input()
t=input()
if s[0]==t[2] and s[1]==t[1] and s[2]==t[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = input()
c2 = input()
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = list(input())
c2 = list(input())
c2_alta = [0 for i in range(3)]
c2_alta[0] = c2[-1]
c2_alta[1] = c2[1]
c2_alta[-1] = c2[0]
if c1 == c2_alta:
  print("YES")
else:
  print("NO")

Solution (Python):

a,b,c = input()
d,e,f = input()
if a != f:
    print("NO")
elif b != e:
    print("NO")
elif c != d:
    print("NO")
else:
    print("YES")

Solution (Python):

import sys





def main():
    c1, c2 = sys.stdin.read().split()
    print('YES' if c1 == c2[::-1] else 'NO') 

if __name__ == "__main__":
    main()

Solution (Python):
print('YES' if input()==input()[::-1] else 'NO')

Solution (Python):
a = input()
b = input()
print('YES' if a==b[::-1] else 'NO')

Solution (Python):
li = []
for _ in range(2):
  li.append(input())
  
if li[0] == li[1][::-1]:
  print("YES")
else:
  print("NO")

Solution (Python):
a=list(input())
b=list(input())
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
import sys
C = [[str(c) for c in l.strip()] for l in sys.stdin]
if (C[0][0] == C[1][2]) and (C[0][1] == C[1][1]) and (C[0][2] == C[1][0]):
  print('YES')
else:print('NO')

Solution (Python):

c1 = input()
c2 = input()

if(c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0]):
  print('YES')
else:
  print('NO')

Solution (Python):

grids = [input() for _ in range(2)]
print('YES' if grids[1][::-1] == grids[0] and grids[0][::-1] == grids[1] else 'NO')

Solution (Python):
l1 = list(map(str, input()))
l2 = list(map(str, input()))
if l1[0]==l2[2] and l1[1]==l2[1] and l1[2]==l2[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
c1=input()
c2=input()
if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = list(input())
b = list(input())

if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
c1 = input()
c2 = input()
if c1 == c2[::-1]:
  print("YES")
else:
  print("NO")

Solution (Python):
C1=list(input())
C2=reversed(input())
print('YES' if all(c1==c2 for c1,c2 in zip(C1,C2)) else 'NO')

Solution (Python):
a = input()
b = input()

c = a[2]+ a[1] + a[0]
print('YES' if b == c else 'NO')

Solution (Python):
print('YES' if input()==input()[::-1] else 'NO')

Solution (Python):
C1 = list(input())
C2 = list(input())
tmp = []
for i in range(3):
    tmp.append(C1[-i-1])
if C2 == tmp:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
b = input()

 
a_reversed = ''.join(list(reversed(a)))
b_reversed = ''.join(list(reversed(b)))


if a == b_reversed and b == a_reversed:
  print('YES')
else:
  print('NO')

Solution (Python):
c1=input()
c2=input()
 
if c1[0]==c2[2] and c1[1] == c2[1] and c1[2] == c2[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
c1 = input()
c2 = input()

if c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
s1, s2 = input(), input()
if s1[0]==s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
c1, c2 = [input() for _ in range(2)]
if c1[0] == c2[-1] and c1[1] == c2[1] and c1[2] == c2[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()
b=input()
print("YES" if a==b[::-1] and b==a[::-1] else "NO")

Solution (Python):
list1 = list(input())
list2 = list(input())

for i in range(len(list1)):
    if list1[i] != list2[len(list2)-1-i]:
        print("NO")
        exit()
print("YES")

Solution (Python):
a,b,c=map(str, input())
x,y,z=map(str, input())
if a==z and b==y and c==x:
  print("YES")
else:
  print("NO")

Solution (Python):
a,b=[input() for _ in range(2)]
print("YES" if a == b[::-1] else "NO")

Solution (Python):
c = list(input())
d = list(input())
c[0], c[2] = c[2], c[0]
print("YES" if c == d else "NO")

Solution (Python):
first = list(input())
second = list(input())

if first[0] == second[2] and first[1]==second[1] and first[2] == second[0]:
  print('YES')
else:
  print('NO')

Solution (Python):
s=input()
t=input()
print('YES' if s==t[::-1] else 'NO')

Solution (Python):
x1 = [i for i in input()]
x2 = [j for j in input()]
x2.reverse()

if x1 == x2:
  print("YES")
else:
  print("NO")

Solution (Python):
s=input()
t=input()
x='NO'
if s[0]==t[2]:
  if s[1]==t[1]:
    if s[2]==t[0]:
      x='YES'
print(x)

Solution (Python):
s = input()
t = input()
print('YES' if s==t[::-1]  else 'NO')

Solution (Python):
s1 = input()
s2 = input()
if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=str(input())
b=str(input())
if(a[0] == b[2] and a[1] == b[1] and a[2] == b[0]):
    print ("YES")
else:
	print ("NO")

Solution (Python):
s=list(input())
t= list(input())
t = t[::-1]
if s==t:
  print("YES")
else:
  print("NO")

Solution (Python):
a=input()
b=input()
print("YES" if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else "NO")

Solution (Python):

S1 = input()
S2 = input()

s1 = S1[0:1]
s2 = S1[1:2]
s3 = S1[2:3]
s4 = S2[0:1]
s5 = S2[1:2]
s6 = S2[2:3]

if s1==s6 and s2==s5 and s3==s4:
    print('YES')
else:
    print('NO')

Solution (Python):
c1=input()
c2=input()
for i in range(3):
  if c1[i]==c2[-1-i]:
    continue
  else:
    print("NO")
    exit(0)
print("YES")

Solution (Python):
C = [input().strip() for _ in range(2)]
if C[0][0]==C[1][2] and C[0][1]==C[1][1] and C[0][2]==C[1][0]:
    print("YES")
else:
    print("NO")

Solution (Python):
s=input()
t=input()
if s==t[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
print("YES" if input() == input()[::-1] else "NO")

Solution (Python):
h = input()
l = input()
print("YES" if h[0] == l[2] and l[0] == h[2] and h[1] == l[1] else "NO")

Solution (Python):
s,t=input(),input()
print('YES' if s==t[::-1] else 'NO')

Solution (Python):
a, b = [input() for i in range(2)]
print("NYOE S"[(a[0] == b[2] and a[1] == b[1] and a[2] == b[0])::2])

Solution (Python):
s=str(input())
t=str(input())
t=t[::-1]
print('YES' if s==t else 'NO')

Solution (Python):
a=input()
b=input()
print('YES' if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else 'NO')

Solution (Python):
a = input()
b = input()
print('YES' if a[::-1] == b else 'NO')

Solution (Python):
C = input()
C = C + input()

if C[0] == C[5] and C[1] == C[4] and C[2] == C[3]:
  print("YES")
else:
  print("NO")

Solution (Python):
one = list(input())
two = list(input())
if one[0] == two[2] and one[1] == two[1] and one[2] == two[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
a = [input().split() for l in range(2)]


if a[0][0][::-1] == a[1][0]:
    print('YES')
else:
    print('NO')

Solution (Python):
C = [input() for _ in range(2)]

print('YES' if C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[0][2] == C[1][0] else 'NO')

Solution (Python):
C1 = input()
C2 = input()


if C1 == C2[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    c1=STR()
    c2=STR()
    if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
    do()

Solution (Python):
c1, c2, c3 = list(input())
c4, c5, c6 = list(input())

flag = True
for x, y in [(c1, c6), (c3, c4), (c2, c5)]:
    if x != y:
        flag = False
if flag:
    print('YES')
else:
    print('NO')

Solution (Python):
c=[]
for i in range(2):
    C=list(input())
    c.append(C)

if c[0][1]==c[1][1] and c[0][0]==c[1][2] and c[0][2]==c[1][0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()
b=input()

if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
C1 = input()
C2 = input()
if C1[0]==C2[2] and C1[1]==C2[1] and C1[2]==C2[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
C=input()+input();print('NYOE S'[C[0]==C[5] and C[1]==C[4] and C[2]==C[3]::2])

Solution (Python):
c1 = input()
c2 = input()
print('YES' if c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0] else 'NO')

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    t = str(input().rstrip('\n'))
    b = True
    for i in range(len(s)):
        if t[i] != s[-i-1]:
            b = False
            break
    print("YES" if b else "NO")


if __name__ == '__main__':
    slove()

Solution (Python):
c_1 = input()
c_2 = input()
print('YES' if c_1 == c_2[::-1] else 'NO')

Solution (Python):
def main():
    print("YES" if input() == input()[::-1] else "NO")


if __name__ == "__main__":
    main()

Solution (Python):
print('YES' if input()[::-1]==input() else 'NO')

Solution (Python):
S = input()
T = input()
for i in range(len(S)):
    if S[len(S)-i-1] != T[i]:
        print("NO")
        exit()
print("YES")

Solution (Python):
A=input()
B=input()

if A == B[::-1]:
  print('YES')
else:
  print('NO')

Solution (Python):
a = input()
b = input()

if a[0]==b[2]:
  if a[1]==b[1]:
    if a[2]==b[0]:
      print('YES')
      exit()

print('NO')

Solution (Python):
a = input()
b = input()

if a[::-1] == b:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
t = input()
 
if s[0]==t[2] and s[1]==t[1] and s[2]==t[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
C1=list(input())
C2=list(input())

if C1[1]==C2[1] and C1[0]==C2[2] and C1[2]==C2[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
def main():
    if input() == input()[::-1]:
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()

Solution (Python):

c1 = input()
c2 = input()
print("YES" if c1 == c2[::-1] else "NO")

Solution (Python):
c1 = input()
c2 = input()
if c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0]:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()
b=input()
print('YES' if a[-1::-1]==b else 'NO')

Solution (Python):
a = input()
b = input()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
b = input()
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
a = input()
b = input()
if a == b[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
c1=input()
c2=input()
print('YES' if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0] else 'NO')

Solution (Python):
c1=input()
c2=input()
if(c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]):
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
print('YES' if a==b[::-1] else 'NO')

Solution (Python):
C1 = list(input())
C2 = list(input())
C2.reverse()

if C1 == C2:
    print('YES')
else:
    print('NO')

Solution (Python):
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
c1 = list(input())
c2 = list(input())
d1 = c1[0] == c2[2]
d2 = c1[1] == c2[1]
d3 = c1[2] == c2[0]
if d1 and d2 and d3:
    print('YES')
else:
    print('NO')

Solution (Python):
s1 = input()
s2 = input()

if s1 == s2[::-1]:
    print('YES')
else:
    print('NO')