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):
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

one = S()
two = S()

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

Solution (Python):
C1=input()
C2=input()
C1new="".join(list(reversed(C1)))
C2new="".join(list(reversed(C2)))
if (C1==C2new)&(C2==C1new):
    print("YES")
else:
    print("NO")

Solution (Python):
c11,c12,c13 = input()
c21,c22,c23 = input()

print(['NO','YES'][c11==c23 and c12==c22 and c13==c21])

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):
S = "".join(reversed(input()))
T = "".join(input())

if S == T:
  print("YES")
else:
  print("NO")

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
c1 = S()
c2 = S()
if c1 == c2[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
c_1 = list(input())
c_2 = list(input())

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

Solution (Python):
import sys

C1 = input()
C2 = input()[::-1]


for i in range(len(C1)):
  if C1 != C2:
    print("NO")
    sys.exit()

print("YES")

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

Solution (Python):
def resolve():
    li = list()
    for i in range(2):
        line = input()
        li.append(line)
    ans = list()
    for i in range(2):
        line = li[1-i]
        al = line[2] + line[1] + line[0]
        ans.append(al)
    sp = ""
    for i in range(2):
        if ans[i] != li[i]:
            sp = "NO"
            break
    if sp != "NO":
        sp = "YES"
    print(sp)
resolve()

Solution (Python):
A=input()
B=input()
count=0
if A[0]==B[2]:
    if A[1]==B[1]:
        if A[2]==B[0]:
            count+=1
if count>0:
    print('YES')
else:
    print('NO')

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

c1 = input().rstrip()
c2 = input().rstrip()[-1::-1]

print('YES' if c1 == c2 else 'NO')

Solution (Python):
C1 = input()

C2 = input()



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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Solution (Python):
x = list(input())
y = list(reversed(list(input())))
if x == y:
    print('YES')
else:
    print('NO')

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

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

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

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

Solution (Python):
C = []
C.append(input())
C.append(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 = list(input())
c2 = str(input())

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

Solution (Python):
x = input()
y = input()

x = list(x)
y = list(y)
x_ = x
y_ = y
x_ = reversed(x)
y_ = reversed(y)
x_ = list(x_)
y_ = list(y_)


if y_ == x and x_ == y:
  print("YES")
else:
  print("NO")

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

Solution (Python):










import sys

def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)


C = sInLV(2)

b1 = C[0][0] == C[1][2]
b2 = C[0][1] == C[1][1]
b3 = C[0][2] == C[1][0]

ans = 'YES' if b1 and b2 and b3 else 'NO'

print(ans)

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

C3 = C1[::-1]

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s = input()
t = input()
print('YES' if s == t[::-1] 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):
import sys
C1 = list(input())
C2 = list(input())

if C2 == C1[::-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):
c1=input()
c2=input()
a=c1[::-1]
b=c2[::-1]
if c1==b and c2==a:
  print('YES')
else:
  print('NO')

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

Solution (Python):
s_1 = input()
s_2 = input()
ans = "YES"
if s_1[0] != s_2[2] or s_1[1] != s_2[1] or s_1[2] != s_2[0]:
    ans = "NO"

print(ans)

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

if U==B[::-1]:
	print("YES")
else:
	print("NO")

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

c11 = C1[0]
c12 = C1[1]
c13 = C1[-1]

c21 = C2[0]
c22 = C2[1]
c23 = C2[-1]

if (c11 == c23) and (c13 == c21) and (c12 == c22):
    print("YES")

else:
    print("NO")

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

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

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(str(input()))
c2 = list(str(input()))

l = [c1, c2]
ll = [[x for x in reversed(c2)] , [x for x in reversed(c1)]]

if l == ll:
    print('YES')
else:
    print('NO')

Solution (Python):


c1 = list(str(input()))
c2 = list(str(input()))

l = [c1, c2]
ll = [[c2[2], c2[1], c2[0]] , [c1[2], c1[1], c1[0]]]

if l == ll:
    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,b=list(input()),list(input())
a.reverse()
print("YES" if a == b else "NO")

Solution (Python):
c1 = input()
c2 = input()
if list(reversed(c1)) == list(c2):
  print('YES')
else:
  print('NO')

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys, re, os
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
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

L = [input() for i in range(2)]

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

Solution (Python):
c = input()
d = input()[::-1]

if c == d:
    print("YES")
else:
    print("NO")

Solution (Python):


import math



from collections import deque
from collections import Counter




c1=input()
c2=input()
for i in range(3):
  if c1[2-i]!=c2[i]:
    print("NO")
    break
else:
  print("YES")

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):
A = str(input())
A = list(A)
B = str(input())
B = list(B)

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

Solution (Python):
import sys
from collections import defaultdict, deque
import math


from bisect import bisect_left, bisect_right





input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def solve():
    s1 = getS()
    s2 = getS()
    
    if "".join(reversed([c for c in s1])) == s2:
        print("YES")
    else:
        print("NO")
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    
    solve()

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):
c = [list(input()) for _ in range(2)]
ans = "NO"
if c[0][::-1] == c[1]:
    ans = "YES"
print(ans)

Solution (Python):
c_1 = input()
c_2 = input()
rotate_1 = c_1[::-1]
rotate_2 = c_2[::-1]
if c_1 == rotate_2 and c_2 == rotate_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,b=open(0).read().split();print("YES" if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else "NO")

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

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

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

if __name__ == '__main__':
    main()

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
a = str(input())
b = str(input())
print("YES" if a==b[::-1] 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):
def actual(s1, s2):
    if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
        return 'YES'

    return 'NO'


s1 = input()
s2 = input()
print(actual(s1, s2))

Solution (Python):
x = input()
y = input()
t = ''
for i in range(3):
  t = x[i] + t
if t == y:
  print('YES')
else:
  print('NO')

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

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

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

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

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

Solution (Python):
a=list(input())
b=list(input())
b.reverse()
print('NYOE S'[a==b::2])

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

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):
c1 = input()
c2 = input()
print('YES' if c1 == c2[::-1] else 'NO')

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

b_reverse = b[::-1]

if a == b_reverse:
  print('YES')
else:
  print('NO')

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

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

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

Solution (Python):

import math

x=input()
y=input()
flag=True
if(x[0]!=y[2]):
    flag=False
elif(x[2]!=y[0]):
    flag=False
elif(x[1]!=y[1]):
    flag=False
if(flag):
    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):
s=input()
t=input()

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

Solution (Python):
c = input()
d = input()

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

Solution (Python):
C = list(input() for i in range(2))
print("YES" if C[0]==C[1][::-1] else "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):
c1 = list(input())
c2 = list(input())
print ("YES") if c1[0] == c2[2] and c1[1] == c2[1] and c1[2] == c2[0] 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 print("NO")

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

Solution (Python):
s1 = input()
s2 = input()
print('YES' if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[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):
s = input()
ss = input()

if s[0] == ss[-1] and s[1] == ss[1] and s[-1] == ss[0]:
  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):
def main():
    g = [input() for _ in range(2)]
    for r in range(2):
        for c in range(3):
            if g[r][c] != g[1 - r][2 - c]:
                print('NO')
                return
    print('YES')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
top = input()
bottom = input()
if top[0] == bottom[2] and top[1] == bottom[1] and top[2] == bottom[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):
import sys
from collections import Counter
from collections import deque
import heapq
import math
import fractions
import bisect
import itertools
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Solution (Python):
C1 = list(str(input()))
C2 = list(str(input()))[::-1]

for i in range(3):
    if not C1[i]==C2[i]:
        print('NO')
        break
else:
    print('YES')

Solution (Python):
n = input()
l = input()
ans = True


for i in range(len(n)):
    if i ==0:
        if n[0] == l[-1]:
            continue
        else :
            ans = False
            break
        
    elif n[i] == l[-i-1]:
        continue
    else :
        ans = False
        break
if ans:
    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
def input(): return sys.stdin.readline().strip()

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

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

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

Solution (Python):
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
c1 = input()
c2 = input()
if c2[2] == c1[0] and c1[1] == c2[1] and c1[2] == c2[0]:
    print('YES')
else:
    print('NO')

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

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

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

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):
def resolve():
  a = input()
  b = input()
  if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print('YES')
  else:
    print('NO')
  return

if __name__ == "__main__":
  resolve()

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

Solution (Python):
def examA():
    C1 = SI()
    C2 = SI()
    ans = "YES"
    if C1[0]!=C2[2] or C1[1]!=C2[1] or C1[2]!=C2[0]:
        ans = "NO"
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

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

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

s = input()
t = input()[::-1]

if s == t:
    print("YES")
else:
    print("NO")

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

Solution (Python):
c1=input()
c2=input()
x=''.join(reversed(c1))
if c2==x:
    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 print("NO")

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

Solution (Python):
first_line = input()
second_line = input()

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

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

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

Solution (Python):
c = input()
s = input()
cl = list(c)
sl = list(s)

cr = list(reversed(cl))

if sl == cr:
    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()
if s == t[::-1]:
  print('YES')
else:
  print('NO')

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

Solution (Python):
s=input()
t=input()
b = True
for i in range(3):
  if s[i]!=t[2-i]:
    b=False
if not b:
  print('NO')
else:
  print('YES')

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

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

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

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

Solution (Python):

s1=list(input())
s2=list(input())

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

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

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

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

Solution (Python):
print('YES' if input()==input()[::-1] else '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):
x = list(input())
y = list(input())
if x[0] == y[2] and x[2] == y[0] and x[1] == y[1]:
  print('YES')
else:
  print('NO')

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

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

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

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):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

c1, c2 = [list(readline().decode().rstrip()) for _ in range(2)]
ans = 'YES' if c1 == c2[::-1] and c2 == c1[::-1] else 'NO'
print(ans)

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

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

Solution (Python):
ct = input()
cb = input()

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

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

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

if c1 == c2:
    print('YES')
else:
    print('NO')

Solution (Python):
c = []
c.append(list(input()))
c.append(list(input()))
if c[0][0] == c[1][2] and c[0][2] == c[1][0] and c[1][1] == c[0][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):
x = list(input())
y = list(input())
if x == list(reversed(y)):
    print("YES")
else:
    print("NO")

Solution (Python):
s1 = str(input())
s2 = list(reversed(input()))
s3 = "".join(s2)
if s1 == s3:
    print("YES")
else:
    print("NO")

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

Solution (Python):


line_1 = input()
line_2 = input()
line = line_1 + line_2
print('YES' if line == line[::-1] else 'NO')

Solution (Python):
c = [list(input()) for _ in range(2)]
if c[0][2] == c[1][0] and c[0][1] == c[1][1] and c[0][0] == c[1][2]:
    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):
print("YES" if input()[::-1]==input() else "NO")

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

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

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

Solution (Python):
C = [input() for _ in range(2)]
tmp = C[0] + C[1]
if tmp == tmp[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):

print(['NO', 'YES'][input() == input()[::-1]])

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

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

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

print('YES') if (list(reversed(c1)) == c2 and list(reversed(c2)) == c1) else print('NO')

Solution (Python):
c1 = input()
c2 = input()
print("YES" if c1 == c2[::-1] else "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()
print('YES' if c1[::-1] == c2 else 'NO')

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

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

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