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,b=[input() for i in range(2)]
c=a[::-1];d=b[::-1]

if a==d and b==c:
  print('YES')
  
else:
  print('NO')

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

Solution (Python):

C1 =str(input())
C2 =str(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][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):
S1,S2=[input() for _ in range(2)]
print("YES") if S1[2]==S2[0] and S1[1]==S2[1] and S1[0]==S2[2] 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):
li = list(input())
li1 = list(input())

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

Solution (Python):
def atc_077a(input_value: str) -> str:
    C1 = input_value[0]
    C2 = input_value[1]

    if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:
        return "YES"
    else:
        return "NO"


C1 = input()
C2 = input()
print(atc_077a([C1, C2]))

Solution (Python):

c = input('')
d = input('')

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
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())

C1 = S()
C2 = S()

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
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())

C1=S()
C2=S()

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
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())

C1 = S()
C2 = S()

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

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

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

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

Solution (Python):
if input() == input()[::-1]:
   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()
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())




c1_str = ''.join(c1)


c2_str_reverse = c2[2] + c2[1] + c2[0]

if c1_str == c2_str_reverse:
    print('YES')
else:
    print('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 = 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[2],a[1],a[0]]==[b[0],b[1],b[2]]:
    print("YES")
else:
    print("NO")

Solution (Python):

C1=input()
C2=input()


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

Solution (Python):

c1=input()
c2=input()

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

Solution (Python):
c1, c2 = [input() for _ in range(2)]


def answer(c1: str, c2: str) -> str:
    if c1[0] == c2[2] and c1[2] == c2[0] and c1[1] == c2[1]:
        return 'YES'
    else:
        return 'NO'

print(answer(c1, c2))

Solution (Python):
c = [""] * 2
c[0] = input()
c[1] = input()
s = True
for i in range(2):
  for j in range(3):
    if c[i][j] != c[-i-1][-j-1]: s = False
if s: 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):
c1 = input()
c2 = input()
if c1[::-1]==c2:
    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):
s=input()
t=input()
t=t[::-1]
if s==t:
  print("YES")
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 b[0] == a[2] and a[1]==b[1]:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
with open(0) as f:
    C = ''.join(f.read().split())
print('YES' if C == C[::-1] else 'NO')

Solution (Python):
a=input()
print("YES") if input()==a[::-1] 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):
'''
問題：
    縦 2 マス、横 3 マスのマス目が与えられます。
    上から i 行目、左から j 行目のマスの色は、Cij で表されます。

    このマス目を 180 度回転させたとき、
    元のマス目と一致するなら YES を、そうでないなら NO を出力するプログラムを作成してください。
'''

'''
制約：
    Cij（1 ≦ i ≦ 2、 1 ≦ j ≦ 3）は英小文字である。
'''


cij = str(input())
cji = str(input())

reverse_cij = cij[2] + cij[1] + cij[0]  

result = ""
if cji == reverse_cij:
    result = "YES"
else:
    result = "NO"

print(result)

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

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

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

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

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

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

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

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

Solution (Python):
C=[list(input()) for _ in range(2)]
flag=True
for i in range(2):
    for j in range(3):
        if C[i][j]!=C[1-i][2-j]:
            flag=False
if flag:
    print("YES")
else:
    print("NO")

Solution (Python):
C123=list(input())
C456=list(reversed(input()))

if C123 == (C456):
    print('YES')
else:
    print('NO')

Solution (Python):

data1=list(input())
data2=list(input())
if (data1[0]==data2[2] and data1[1]==data2[1] and data1[2]==data2[0]):
    print('YES')
else:
    print('NO')

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

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

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

Solution (Python):
word1, word2 = [input() for i in range(2)]
if word1[0] == word2[2] and word1[1] == word2[1] and word1[2] == word2[0]:
    print('YES')
else:
    print('NO')

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

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

result = 'YES'
i = 0
j = -1
while i < len(a):
    if a[i] != b[j]:
        result = 'NO'
        break
    i += 1
    j -= 1

print(result)

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

if c2 == c1[::-1] and c1 == c2[::-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()

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


def atc_077a(input_value: str) -> str:
    C1 = input_value[0]
    C2 = input_value[1]

    if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:
        return "YES"
    else:
        return "NO"


C1 = input()
C2 = input()
print(atc_077a([C1, C2]))

Solution (Python):
C1 = str(input())
C2 = str(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
b=input()
c=[]
for i in range(len(b)):
	c.append(b[i])




f=input()
t=[]
for i in range(len(f)):
	t.append(f[i])
d=[]
for i in range(len(c)):
	d.append(c[-(i+1)])
	
if d==t:
	print("YES")
else:
	print("NO")

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

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

Solution (Python):
Ci = input()
Cj = input()

if Ci[0] == Cj[-1] and Ci[1] == Cj[-2] and Ci[2] == Cj[-3]:
    print('YES')
else:
    print('NO')

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


if __name__ == "__main__":
    main()

Solution (Python):
data1 = input()
data2 = input()

count = 3 -1
sw = 0
i = 0
j = len(data2)-1
while i <= count:
    if data1[i] == data2[j]:
        sw += 1
    i += 1
    j -= 1
if sw == 3:
    print("YES")
else:
    print("NO")

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

Solution (Python):
S = input()[::-1]
T = input()
print('YES' if S == T else '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):
s = str(input())
t = str(input())

if s[0] == t[2] and s[1] == t[1] and s[2] == t[0]:
    result = "YES"
else:
    result = "NO"

print(result)

Solution (Python):

line1 = input()
line2 = input()
my_list1 = []
my_list2 = []
 
for i in line1:
    my_list1.append(i)
 
for i in line2:
    my_list2.append(i)
 
my_list2.reverse()
 
if my_list1 == my_list2:
    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], c1[1], c1[2]] == [c2[2], c2[1], c2[0]]:
    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[2],a[1],a[0]]==[b[0],b[1],b[2]]:
    print("YES")
else:
    print("NO")

Solution (Python):

C1 = str(input())
C2 = str(input())


ori_str = C1 + C2


rev_str = ori_str[-1::-1]


if ori_str == rev_str:
    print("YES")
else:
    print("NO")

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

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

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

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

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

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

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

Solution (Python):
C=input()+input()
print("YNEOS"[1 in[1 for i in range(3)if C[i]!=C[-i-1]]::2])

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

Solution (Python):
C1 = str(input())
C2 = str(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

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    x = input()
    y = input()

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


if __name__ == '__main__':
    main()

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

new_str = ''.join(list(reversed(a)))
print('YES' if new_str==b else 'NO')

Solution (Python):
c1 = input()
c2 = 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):
a = input()                      
b = input()                      
                                 
c = a[0] + a[1] + a[2]           
d = b[-1] + b[-2] + b[-3]        
                                 
if c == d:                       
    print("YES")                 
else:                            
    print('NO')

Solution (Python):
C_11, C_12, C_13 = input()
C_21, C_22, C_23 = input()


if C_11 == C_23 and C_13 == C_21 and C_12 == C_22:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
import numpy as np

Cij = [list(input()) for _ in range(2)]
Cij_inv = np.rot90(Cij, 2)

if np.array_equal(Cij, Cij_inv):
    print('YES')
else:
    print('NO')

Solution (Python):
C = [str(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]:
  ans = "YES"
else:
  ans = "NO"
print(ans)

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

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

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

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

Solution (Python):
c1, c2 = (input() for s in range(0,2))
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()[::-1]
print("YES" if a==b 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")
  exit()
print("NO")

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

Solution (Python):
up  = list(input())
down = list(input())

up.reverse()
if up == down:
    print('YES')
else:
    print('NO')

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

c = b[::-1]

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

Solution (Python):
a=ina=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()[::-1]

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

Solution (Python):
c1 = str(input())
c2 = str(input())
ans = 'NO'

if c1[0] == c2[2]:
    if c1[1] == c2[1]:
        if c1[2] == c2[0]:
            ans = 'YES'
            
print(ans)

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

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

Solution (Python):
i = input()
j = input()

if i == j[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):
C=[0,0]
C[0]=list(map(str,input()))
C[1]=list(map(str,input()))
ans="NO"
X=C[0][::-1]
if C[1]==X:
    ans="YES"
print(ans)

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

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

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

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

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

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

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

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

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

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

row_1 = [w for w in first]
row_2 = [w for w in second]

if row_1[0] == row_2[2] and row_1[1] == row_2[1] and row_1[2] == row_2[0]:
    ans = 'YES'
else:
    ans = 'NO'

print(ans)

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):
L=list(input())
R=list(input())
if L[0]==R[2] and L[1]==R[1] and L[2]==R[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
a = list(input())
b = list(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):
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().strip()
c2 = input().strip()
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.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    C = read().split()
    for i in range(3):
        if C[0][i] != C[1][2-i]:
            print('NO')
            break
    else:
        print('YES')


if __name__ == '__main__':
    main()

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

Solution (Python):
c1 = str(input())
c2 = str(input())
isYES = True
for i in range(len(c1)):
    if c1[i]!=c2[-(i+1)]:
        isYES = False
if isYES:
    print('YES')
else:
    print('NO')

Solution (Python):
r=input()
s=input()
t=1
for i in range(3):
    t*=(r[i]==s[2-i])
print(["NO","YES"][t==1])

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

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

def main():
    C = input()
    C2 = input()

    for i in range(3):
        if C[i] != C2[2-i]:
            print('NO')
            return
    print('YES')


if __name__ == '__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


def main():
    s = input()
    t = input()
    for i, c in enumerate(s):
        if t[-i-1] != c:
            print("NO")
            return
    print("YES")

if __name__ == "__main__":
    main()

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

Solution (Python):









t = input()
b = input()

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

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

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

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

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

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

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

Solution (Python):
a,b = raw_input(), raw_input()
print ('Yes' if a == b[::-1] else 'No').upper()

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

Solution (Python):
import sys
C1=input()
C2=input()
D1=C2[2]+C2[1]+C2[0]
D2=C1[2]+C1[1]+C1[0]
if C1==D1 and C2==D2:
  print("YES")
else:
  print("NO")

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

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

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

Solution (Python):
C1 = input()
R1 = C1[::-1]
C2 = input()
R2 = C2[::-1]
print(['NO','YES'][R2==C1 and R1==C2])

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

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

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

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

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

if(a == b[::-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):
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):
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):
for x,y in zip(input(),reversed(input())):
  if x!=y:
    print('NO')
    break
else:
  print('YES')

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

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

ans = "YES" if c1 == list(reversed(c2)) else "NO"
print(ans)

Solution (Python):
R = str(input())
G = str(input())


if R[0] == G[2] and R[2] == G[0] and R[1] == G[1]:
	print('YES')
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 accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

C1 = input()
C2 = input()

flag = True
for i in range(3):
    if (C1[i] != C2[2 - i]):
        flag = False
if flag:
    print("YES")
else:
    print("NO")

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

ok = True
for i in range(3):
    if C1[i]!=C2[2-i]:
        ok=False
print("YES" if ok else "NO")

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S1 = readline().strip()
    S2 = readline().strip()
    
    if S1 == S2[::-1]:
        print('YES')
    else:
        print('NO')
    
    return


if __name__ == '__main__':
    main()

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

rc1 = c1[::-1]
rc2 = c2[::-1]


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

Solution (Python):
import sys

a,b,c = map(str,sys.stdin.readline().rstrip())
d,e,f = map(str,sys.stdin.readline().rstrip())
print('YES' if a == f and b == e and c == d else 'NO')

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
INF = 10**18


if __name__ == "__main__":
    c = list(input())
    t = list(input())
    for i in range(len(c)):
        if c[i] != t[len(t)-i-1]:
            print("NO")
            sys.exit()
    print("YES")

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

Solution (Python):
Clist=list(input())
Dlist=list(input())

if Clist==Dlist[::-1]:
	print("YES")
else:
	print("NO")

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


if __name__ == "__main__":
    solve()

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


l1=list(input())
l2=list(input())

if l1 == l2[::-1]:
    print('YES')
else:
    print('NO')

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

Solution (Python):
C = ""
for i in range(2):
    C += input()
    
if list(C) == list(reversed(C)):
    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):
print('YNEOS'[input()!=input()[::-1]::2])

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

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

A = list(input())
B = list(input())
B.reverse()


def ok():
    for a, b in zip(A, B):
        if a != b:
            return False

    return True

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

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

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

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

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

if c23 == c11 and c22 == c12 and c21 == c13:
    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] and c2==c1[::-1]:
    print('YES')
else:
    print('NO')

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

Solution (Python):
A=input()
B=input()
X="NO"
if A[0]==B[2] and A[1]==B[1] and A[2]==B[0]:
  X="YES"
print(X)

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

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

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

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