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

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

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

Solution (Python):
import sys

s = sys.stdin.read().split()

def main():
    ans = 'YES' if s[0] == s[1][::-1] else 'NO'
    print(ans)

if __name__ ==  '__main__':
    main()

Solution (Python):

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

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


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

Solution (Python):
n1=list(input().rstrip())
n2=list(input().rstrip())
ans="YES"
for i in range(len(n1)):
  if n1[i]!=n2[-1-i]:
    ans="NO"
    break
print(ans)

Solution (Python):
row1 = input()
row2 = input()

if row1[0] == row2[2] and row1[1] == row2[1] and row1[2] == row2[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
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = input()
    b = input()

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

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

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

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

Solution (Python):
A = input() + input()
print('YES' if A[0] == A[5] and\
               A[1] == A[4] and\
               A[2] == A[3] else 'NO')

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):
A,B,C=input();D,E,F=input();print('YNEOS'[A!=F or B!=E or C!=D::2])

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

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

Solution (Python):
c1,c2 = [list(input()) for i in range(2)]
c2.reverse()
print('YES' if c1==c2 else 'NO')

Solution (Python):
c1 = input()
c2 = input()
c3 = c2[2] + c2[1] + c2[0]

if c1 == c3:
    print("YES")
else:
    print("NO")

Solution (Python):


YES = "YES"  
NO = "NO"  


def main():
    
    c = [input() for _ in range(2)]
    print(YES if c == [ci[::-1] for ci in c[::-1]] else NO)


if __name__ == '__main__':
    main()

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() for _ in range(2)]

for i in range(2):
    for j in range(3):
        if C[i][j] != C[1-i][2-j]:
            print('NO')
            exit()

print('YES')

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 math



a=input()
b=input()


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

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

Solution (Python):
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))

from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

s = input()
t = input()

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

Solution (Python):
s1 = input()
s2 = input()
ans = {True:"YES",False:"NO"}
print(ans[s1==s2[::-1]])

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

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

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

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

Solution (Python):
str = input()
newStr = input()
def f(s):
    s = list(s)
    if len(s) <= 1:
        return s
    i = 0
    length = len(s)
    while i< length/2:
        s[i],s[length-1-i] = s[length-1-i],s[i]
        i += 1
    return ''.join(s)
if newStr == f(str):
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
C1 = list(input())
C2 = list(input())
if C1 == C2[::-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):
c11,c12,c13 = map(str,input())
c21,c22,c23 = map(str,input())
if c11 == c23 and c12 == c22 and c13 == c21:
    print("YES")
else:
    print("NO")

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

Solution (Python):
a=str(input())
b=str(input())
if a[0]==b[2] and a[2]==b[0] and a[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):
import math

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()

for i in range(3):
  if a[i] != b[2 - i]:
    print('NO')
    exit()
print('YES')

Solution (Python):
a=input()
b=input()
a=a[::-1]
if a==b :
    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):
str1=input()
str2=input()
str3=str1[::-1]
if str3==str2:
    print("YES")
else:
    print("NO")

Solution (Python):
s = [ list(input()) for i in range(2)]
t = [ [0 for j in range(3)] for i in range(2) ]
for i in range(2):
    for j in range(3):
        t[1-i][2-j] = s[i][j]
print("YES" if s == t else "NO")

Solution (Python):
f = input()
g = input()
g = list(g)
g.reverse()
p = (''.join(g))
if p == f:
  print("YES")
else:
  print("NO")

Solution (Python):
def reverse(string):
    string = string[::-1]
    return string


l=input()
m=input()
if l == reverse(m):
    print("YES")
else:
    print("NO")

Solution (Python):
row1 = input()
row2 = input()

r1 = row1[::-1]
r2 = row2[::-1]

if(row1 == r2 and row2 == r1):
    print("YES")
else:
    print("NO")

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

Solution (Python):

x = list(input())
y = list(input())



if (x[0] != y[-1] or x[-1] != y[0] or x[1] != y[1] or len(x)!=3 or len(y)!=3):
    print( "NO")
else:
    print( "YES")

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

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

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

flag = 0
for i in range(3):
  if S1[i] != S2[2-i]:
    flag = 1

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

Solution (Python):
a=input()
b=input()
c=''
for i in range(3):
    c+=a[2-i]
if(c==b):
    print("YES")
else:
    print("NO")

Solution (Python):
x = list(input())
y = list(input())
if ( len(x)!=3 or len(y)!=3 or x[0] != y[-1] or x[-1] != y[0] or x[1] != y[1]):
    print( "NO")
else:
    print( "YES")

Solution (Python):
str1=input()
str2=input()

str2=str2[::-1]

if(str1==str2):
    print('YES')
else:
    print('NO')

Solution (Python):
n = input()
m = input()
m = "".join(reversed(m))
if n==m:
  print("YES")
else:
  print("NO")

Solution (Python):
r1 = input();
r2 = input();
if r1[0] == r2[2] and r1[1] == r2[1] and r1[2] == r2[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):
row1 = str(input())
row2 = str(input())

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

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

Solution (Python):
a=input()
b=input()
rev = ''.join(reversed(a))
if rev==b:
    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()
r = input()
s = s + r
if s == s[: : -1]:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
r = input()
s = s + r
r = ''.join(reversed(s))
if s == r:
    print("YES")
else: print("NO")

Solution (Python):
str1=input()
str2=input()

l1=list(str1)
l2=list(str2)

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

Solution (Python):
a=input()
b=input()
if(a[2]==b[0] and a[1]==b[1] and a[0]==b[2]):
    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()

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

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

Solution (Python):
a=input().strip()
b=input().strip()
b=b[::-1]
print("YES" if a==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):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    A=input()
    B=input()
    C=''.join(list(reversed(B)))
    if A==C:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

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

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

m1 = "".join(c1)
m2 = "".join(c2)

a1 = list(reversed(c1))
a2 = list(reversed(c2))

r1 = "".join(a2)
r2 = "".join(a1)


if r1 == m1 and r2==m2:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
import sys

a = input()
b = input()

for i in range(3):
    if a[i] != b[2 - i]:
        print("NO")
        sys.exit()
print("YES")

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

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

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

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

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

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

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

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

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

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

c = nsn(2)

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

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

Solution (Python):
C1s = input()
C2s = input()

if C1s[::-1] == C2s:
    print('YES')
else:
    print('NO')

Solution (Python):

s=input()
t=input()
u=t[::-1]
flag=True
for i in range(3):
    if s[i]!=u[i]:
        flag=False
        break
if flag:
 	print("YES")
else:
 	print("NO")

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

Solution (Python):
S=input()
T=input()
for i in range(3):
    if(S[i]!=T[2-i]):
        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):
ca = input()
cb = input()

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

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

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

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):
s1 = input()
s2 = input()

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

Solution (Python):
a, b, c = raw_input()
d, e, f = raw_input()
if a == f and b == e and c == d:
    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):
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()
s = s[::-1]
t = input()

if s == t:
    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):
i = list(input())
t = list(input())
e = i.pop(-1)
s = i.pop(0)
i.insert(0,e)
i.append(s)
if i == t:
  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):
a=str(input())
b=str(input())
if a[::-1]==b:
  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[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):
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,b=input(),input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print('YES')
else:print('NO')

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

Solution (Python):
st1=str(input())
st2=str(input())
for i in range(3):
  if st1[i]!=st2[2-i]:
    print('NO')
    break
  if i==2:
    print('YES')

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

Solution (Python):


l1=input().strip()
l2=input().strip()

new_l1=l2[::-1]
new_l2=l1[::-1]

print( "YES" if l1==new_l1 and l2==new_l2 else "NO")

Solution (Python):

C1=input()
C2=input()
print('YES' if all([C1[i]==C2[2-i] for i in range(3)]) else 'NO')

Solution (Python):

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

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

main()

Solution (Python):
c1 = input()
c2 = input()[::-1]

if c1 == c2:
    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 list(c1) == list(reversed(c2)):
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))
MOD=10 ** 9 + 7


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

Solution (Python):
c = input()
d = input()
if all(c[i]==d[-1-i] for i in range(3)):
    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=[list(input()) for i in range(2)]
if C[0]==C[1][::-1]:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
c1 = input()
c2 = input()
c2 = c2[2] + c2[1] + c2[0]

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

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

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

Solution (Python):
c1 = []
c2 = []

c1 = input()
c2 = input()

equal = 0
for i in range(3):
	if (c1[i] != c2[2-i]):
		equal = 1

if (equal == 0):
	print("YES")
else:
	print("NO")

Solution (Python):
c1 = input()
c2 = "".join(reversed(list(input())))

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

Solution (Python):
c1 = input()
c2 = input()
ans = "YES"
if c1[0] != c2[2]:
    ans = "NO"
elif c1[1] != c2[1]:
    ans = "NO"
elif c1[2] != c2[0]:
    ans = "NO"
print(ans)

Solution (Python):
def rotation(c , c2):

    return "YES" if c == c2[-1] + c2[1] + c2[0] else "NO"

def main():
    c = str(input())
    c2 = str(input())
    print(rotation(c , c2))

if __name__ == '__main__':
    main()

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

Solution (Python):
S = list(map(str, input()))
T = list(map(str, input()))

def f():
	for i in range(3):
		if S[i] != T[2 - i]:
			return "NO"
	return "YES"
	
print(f())

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

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

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

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

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


if __name__ == '__main__':
    main()

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

if s1 == s2[::-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()
c2_rev=c2[::-1]
if c1==c2_rev:
    print("YES")
else:
    print("NO")

Solution (Python):
c1 = list(map(str, input()))
c2 = list(map(str, input()))

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

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

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

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

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

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

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

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

if a==b:
    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=str(input())
T=str(input())
print('YES' if S[0]==T[2] and S[1]==T[1] and S[2]==T[0] 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):
print('YES')if input() == input()[::-1] 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[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
a=input()
b=input()
ret='YES'
for i in range(3):
  if a[i]!=b[2-i]:
    ret='NO'
    break
print(ret)

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

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

ans = "YES"

if a[0] != b[2]:
    ans = "NO"
if a[1] != b[1]:
    ans = "NO"
if a[2] != b[0]:
    ans = "NO"
print(ans)

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

Solution (Python):
a = input()
b = input()
b = b[::-1]
print("YES" if a == 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):
S=input()
T=input()
if [S[0],S[1],S[2]]==[T[2],T[1],T[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):
print('YNEOS'[input()!=input()[::-1]::2])

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):
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):
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 = list(input())
b = list(input())
print("YES" if a == b[::-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):
C = []
for i in range(2):
    c = input()
    C.append(c)

if C[0][0] == C[1][2]:
    if C[0][2] == C[1][0]:
        if C[0][1] == C[1][1]:
            print("YES")
            exit()
print("NO")

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

Solution (Python):
C1=list(map(str,input()))
C2=list(map(str,input()))
CR1=C1[:]
CR2=C2[:]
C1.reverse()
C2.reverse()
print("YES" if C1==CR2 and C2==CR1 else "NO")

Solution (Python):
C1=list(map(str,input()))
C2=list(map(str,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[0]==t[2] and s[1]==t[1] and s[2]==t[0]:
  print("YES")
else:
  print("NO")

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

Solution (Python):
str = input().split()
C1 = str[0]
str = input().split()
C2 = str[0]
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[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print("YES")
else:
    print("NO")

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

Solution (Python):




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


if __name__ == "__main__":
    main()

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):
li_1 = input()
li_2 = input()
if li_1 == li_2[2]+li_2[1]+li_2[0] and li_2 == li_1[2]+li_1[1]+li_1[0]:
    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):
s=input()
t=input()
flag=0
if (s[0]==t[2])and(s[1]==t[1])and(s[2]==t[0]):
    flag=1
if flag==0:
    print("NO")
else:
    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())[::-1]
if A == 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):
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B = read().decode('utf8').split()
print('YES' if A == B[::-1] and B == A[::-1] else 'NO')

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

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

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

for x in range(3):
  if a[x] != b[2-x]:
    print('NO')
    exit()

print('YES')

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

Solution (Python):
arr = [[''] * 3 for i in range(2)]
for i in range(2):
    tmp = input()
    tmp = list(tmp)
    arr[i] = tmp

if arr[0][0] == arr[1][2] and arr[0][1] == arr[1][1] and arr[0][2] == arr[1][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):
C1 = input()
C2 = input()

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

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

print("YES" if s == "".join(reversed(s)) else "NO")

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

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):
c = [input() for _ in range(2)]

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

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

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

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

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

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

Solution (Python):
a = list(input())
b = list(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):
s = input()
t = input()
print("YES" if s==t[::-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):
C=input()+input()
print("YNEOS"[C!=C[::-1]::2])

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

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

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

Solution (Python):
c=input()
d=input()
print("YES" if c==d[::-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 numpy as np

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

Solution (Python):


import numpy as np

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

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

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):
a=input()

b=input()

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

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