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=[input() for i in range(2)]
flag=True

for i in range(3):
        if c[0][i]!=c[1][2-i]:
                flag=False
if flag:
        print("YES")
else:
        print("NO")

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

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


b_r = a[::-1]
a_r = b[::-1]


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

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

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

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

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

Solution (Python):


a = raw_input()
b = raw_input()

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

Solution (Python):
in1 = input()
in2 = input()

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

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

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

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

C1=C1[::-1]

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

Solution (Python):
a = [0,0]
temp = [0,0]

for k in range(2):
    temp[k] = input()
    a[1-k] = temp[k][::-1]

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

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

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):
a1 = list(input())
a2 = list(input())
a1.reverse()
if (a1 == a2): print("YES")
else: print("NO")

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

n=0
for i in range(3):
    if  A[i]==B[2-i]:
        n+=1

if n==3:
    print("YES")
else:
    print("NO")

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

if X == Y[::-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):
print "YES" if raw_input() == raw_input()[::-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):
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()
a_list = list(a)
b_list = list(b)

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

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

Solution (Python):
first = input()
second = input()
for i in range(3):
    if first[i-1] != second[-i]:
        print('NO')
        break
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):
first = list(input())
second = list(input())
if first[0]==second[2] and first[1]==second[1] and first[2]==second[0]:
    print("YES")
else:
    print("NO")

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

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

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

Solution (Python):

def main():
    matrix = []
    for _ in range(2):
        matrix.append(list(input()))

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
l1 = input()
l2 = input()
flag = 1
for i in range(len(l1)):
    if l1[i] != l2[-i-1]:
        flag = 0
if flag:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
a, b, c = list(input())
d, e, f = list(input())

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

Solution (Python):
lst1 = list(input())
lst2 = list(input())
new_lst1 = []
new_lst2 = []

for i in range(3):
    new_lst1.extend(lst2[2-i])
    new_lst2.extend(lst1[2-i])
if new_lst1==lst1 and new_lst2==lst2:
    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):
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=raw_input()
y=raw_input()
if x[0]==y[2] and x[1]==y[1] and x[2]==y[0]:
 print 'YES'
else:
 print 'NO'

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    c = [[t for t in S()] for _ in range(2)]
    c[1].reverse()
    if c[0] == c[1]:
        return 'YES'

    return 'NO'



print(main())

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

Solution (Python):
def solve():
    C_1 = input()
    C_2 = 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")
 
solve()

Solution (Python):

 

str1=input()
str2=input()
 
if str1 == str2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
b = input()
 
global ans
ans = 1

for i in range(len(a)): 
  if a[i] != b[2-i]:
   ans = 0
   break
 

if ans ==1:
 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 = list(str(input()))
C2 = list(str(input()))

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

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

ans = "YES" if result else "NO"
print(ans)

Solution (Python):
a = input()
b = input()
alist = list(a)
blist = list(b)
ans = "YES"
for i in range(3):
    if alist[i] == blist[2-i]:
        continue
    else:
        ans =("NO")
print(ans)

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

res=True
for i in range(2):
    for j in range(3):
        res&=c[i][j]==c[1-i][2-j]
print('YES' if res else 'NO')

Solution (Python):
import sys
import random

def rd():
        return sys.stdin.readline().rstrip()

def rdi():
        return [ int(x) for x in rd().split() ]

(c11, c12, c13) = rd()
(c21, c22, c23) = rd()

if c12 == c22 and c11 == c23 and c13 == c21:
        print "YES"
else:
        print "NO"

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

Solution (Python):
def main():
    c_mat = [[c for c in input()] for _ in range(2)]

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


if __name__ == "__main__":
    main()

Solution (Python):
input1 = input()
input2 = input()

if input1[::-1] == input2[::] :
    print("YES")
else :
    print("NO")

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

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

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

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

Solution (Python):
a=raw_input()
b=raw_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();print("YES"if a==b[::-1]else"NO")

Solution (Python):
a=input()
a=list(a)
b=input()
b=list(b)
n=len(a)
N=1
for i in range(n):
 if(a[i]!=b[-(i+1)]):
    N=0
if(N==1):
   print("YES")
else:
   print("NO")

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

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

Solution (Python):
line1 = list(input())
line2 = list(input())
overall = line1 + line2

gyaku = overall[::-1]

if overall == gyaku:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):

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

if __name__ == "__main__":
	c1 = input()
	c2 = input()
	rotation(c1, c2)

Solution (Python):
import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

f = S()
s = S()
revf,revs = "",""
for i in range(2,-1,-1):
    revf += s[i]
    revs += f[i]

if f == revf and s == revs:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")
 
 
def main():
    A, B = input(), input()
    print("YES" if A == B[::-1] else "NO")
 
 
if __name__ == '__main__':
    main()

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

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

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 'NO')

Solution (Python):
A,B = input(),input()
for a,b in zip(A,B[::-1]):
    if a != b:
        print('NO')
        break
else:
    print('YES')

Solution (Python):
a=input()
b=input()
aa=a[::-1]

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

Solution (Python):

c = [ list(input()) for _ in range(2) ] 
a = list(reversed(c[1]))
b = list(reversed(c[0]))
if ''.join(c[0]) == ''.join(a) and ''.join(c[1]) == ''.join(b):
    print("YES")
else:
    print("NO")

Solution (Python):
text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")


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


if __name__ == '__main__':
    main()

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

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):
def main():
	c1 = input()
	c2 = input()
	
	if c1[0] == c2[-1] and c1[1] == c2[1] and c1[-1] == c2[0]:
	    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):
up = input()
down = input()
 
rev_up = up[::-1]
rev_down = down[::-1]
 
if rev_up == down and rev_down == up:
    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):
char1 = input()
char2 = input()
if char1 == char2[::-1]:
	print("YES")
else:
	print("NO")

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

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

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

Solution (Python):

c1 = raw_input()
c2 = raw_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 b[0] == a[2] and a[1]==b[1]:
    print('YES')
else:
    print('NO')

Solution (Python):



c1 = str(raw_input())
c2 = str(raw_input())

c1_list = list(c1)
c1_list.reverse()
if list(c2) == c1_list :
    print 'YES'
else :
    print 'NO'

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

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

    S = []
    hoge = []
    for x in reversed(range(3)):
        hoge.append(C[1][x])
    S.append(hoge)
    hoge = []
    for x in reversed(range(3)):
        hoge.append(C[0][x])
    S.append(hoge)

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

if __name__ == "__main__":
    main()

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

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

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

A = list(input())
B = list(input())
for i in range(3):
    if A[i] != B[2 - i]:
        print("NO")
        sys.exit(0)
print("YES")

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

Solution (Python):
word1 = input()
word2 = input()
point= 0

for i in range(0,3):
    if word1[i] == word2[2-i]:
            point+=1

if point == 3:
    print("YES")
else:
    print("NO")

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

c1_list = list(c1)
c1_list.reverse()
if list(c2) == c1_list :
    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):
row1 = input()
row2 = input()

moji1 = list(str(row1))
moji2 = list(str(row2))
moji = moji1 + moji2

newmoji = moji[::-1]

if moji == newmoji:
    print("YES")
else:
    print("NO")

Solution (Python):


c1 = raw_input()
c2 = raw_input()

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

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

if row1 == row2[::-1]:
    print "YES"
else:
    print "NO"

Solution (Python):
import sys

str1 = sys.stdin.readline()
str2 = sys.stdin.readline()

if str1[0] != str2[2]:
    print ("NO")
elif str1[1] != str2[1]:
    print ("NO")
elif str1[2] != str2[0]:
    print ("NO")
else:
    print ("YES")

Solution (Python):
inp1=input().rstrip()
inp2=input().rstrip()

rvs1="".join([inp1[x:x+1] for x in range(2,-1,-1)])
rvs2="".join([inp2[x:x+1] for x in range(2,-1,-1)])

if rvs1==inp2 and rvs2==inp1:
    print("YES",flush=True)
else:
    print("NO",flush=True)

Solution (Python):
def A_Rotation(C1, C2):
    C = [C1, C2]
    C_rotate = [C2[::-1], C1[::-1]]
    if C == C_rotate:
        return 'YES'
    else:
        return 'NO'

C1 = input().strip()
C2 = input().strip()
print(A_Rotation(C1, C2))

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

s2 = s2[::-1]

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

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):
char1 = input()
char2 = input()
char3 = ""
char4 = ""
for x in reversed(range(3)):
  char3=char3+char2[x]
for y in reversed(range(3)):
  char4=char4+char1[y]
if char2 == char4:
  print("YES")
else:
  print("NO")

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

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

Solution (Python):
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

def get_row():
    array = []
    txt = raw_input()

    for char in txt:
        array.append(char)

    return array


cells_top = []
cells_bottom = []


cells_top = get_row()
cells_bottom = get_row()

p_dbg(cells_top)
p_dbg(cells_bottom)


cells_top.reverse()

p_dbg(cells_top)


if(cells_top == cells_bottom):
    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)]
i=0
while i<3 and C[0][i]==C[1][2-i]:
    i+=1
p="NO"
if i==3:
    p="YES"
print(p)

Solution (Python):
x, y = input(), input()
print("YES" if all(xx == yy for (xx, yy) in zip(x, y[::-1])) else "NO")

Solution (Python):



str1=input()
str2=input()

if str1 == str2[::-1]:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):


def test(c1, c2):
    for i in range(2):
        for j in range(3):
            if c1[i][j] != c2[i][j]:
                return("NO")
    return("YES")

if __name__ == "__main__":
    s1 = input()
    s2 = input()
    s = [s1, s2]
    c1 = [[0,0,0],[0, 0, 0]]
    for i in range(2):
        for j in range(3):
            c1[i][j] = s[i][j]

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

    answer = test(c1, c2)
    print(answer)

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

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

if __name__ == '__main__':
    main()

Solution (Python):



str1 = input()
str2 = input()
c11, c12, c13 = [i for i in str1]
c21, c22, c23 = [i for i in str2]

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

Solution (Python):
def main():
    c = []
    rev_c = []
    N = 2
    for i in range(N):
        s = input()
        c.append(s)
    
    
    
    
    
    for str_ in c:
        rev_c.append(str_[::-1])
    rev_c= rev_c[::-1]
    
    
    if(c == rev_c):
        print("YES")
    else:
        print("NO")
    
if __name__=="__main__":
    main()

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):
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,j in zip(a,b[::-1]):
    if i != j:
        print("NO")
        break
else:
    print("YES")

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

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

Solution (Python):

from sys import stdin, stdout

def rint():
   return map(int, stdin.readline().split())


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 = input()
C2 = input()
C2 = C2[::-1]
for i in range(3):
    if C1[i] == C2[i]:
        pass
    else:
        print('NO')        
        sys.exit()
print('YES')

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

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

Solution (Python):


C1=raw_input()
C2=raw_input()

if C1[0]!=C2[2]:
    print 'NO'
elif C1[1]!=C2[1]:
    print 'NO'
elif C1[2]!=C2[0]:
    print 'NO'
else:
    print 'YES'

Solution (Python):

C1 = raw_input()
C2 = raw_input()

C = [C1, C2]
C_rev = [C2[::-1], C1[::-1]]

if C == C_rev:
    print 'YES'
else:
    print 'NO'

Solution (Python):
import sys

line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")

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

Solution (Python):

up=input()
dw=input()
if up[::-1] == dw:
    print("YES")
else:
    print("NO")

Solution (Python):
input_lines = list(input())
input_lines2 = list(input())

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

Solution (Python):
s1 = str(input())
s2 = str(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):
c1 = input()
c2 = input()
c2 = c2[::-1]

import sys
for (a, b) in zip(c1, c2):
    if a != b:
        print('NO')
        sys.exit(0)

print('YES')

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

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

Solution (Python):
S=raw_input()
T=raw_input()

if S==T[::-1]:
	print "YES"
else:
	print "NO"

Solution (Python):
upper =list(input())
lower =list(input())
while upper[1] == lower[1]:
    if upper[0] == lower[2] and upper[2] == lower[0]:
        print("YES")
        break
    else:
        print("NO")
        break
else :
    print("NO")

Solution (Python):
a=input()
a=list(a)
b=input()
b=list(b)
n=len(a)
j=1
for i in range(n):
  if(a[i]!=b[-(i+1)]):
    j=0
if(j==1):
  print("YES")
else:
  print("NO")

Solution (Python):


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

Solution (Python):


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

ans = True
for i in range(3):
    if C[0][i] != C[1][2 - i]:
        ans = False

print('YES' if (ans) else 'NO')

Solution (Python):
t1=raw_input()
t2=raw_input()
if t1[0]==t2[2] and t1[1]==t2[1] and t1[2]==t2[0]:
 print "YES"
else:
 print "NO"

Solution (Python):
a = []
a.append(input())
a.append(input())

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

Solution (Python):
a = raw_input()
b = raw_input()
judge = True
for i in xrange(3):
    if a[i] != b[-1-i]: judge = False
if judge:
    print 'YES'
else:
    print 'NO'

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



"""077-a"""

import sys
import pprint
import re

import itertools
pp = pprint.PrettyPrinter(indent=2)

def main():
    """Main function."""
    c1 = input()
    c2 = input()

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


if __name__ == '__main__':
    sys.exit(main())

Solution (Python):
import sys

C1 = input()
C2 = input()
for i in range(3):
    if C1[i] != C2[2-i]:
        print('NO')
        sys.exit()
print('YES')

Solution (Python):





from sys import stdin

def solve(s1, s2):
    for i in range(len(s1)):
        if s1[i] != s2[- 1 - i]: return "NO"
    return "YES"

s1 = stdin.readline().strip()
s2 = stdin.readline().strip()
if len(s1) != 3 or len(s2) != 3: raise
print(solve(s1, s2))

Solution (Python):



str1 = input()
str2 = input()
c11, c12, c13 = [i for i in str1]
c21, c22, c23 = [i for i in str2]

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

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

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

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

main()

Solution (Python):
import sys

a = sys.stdin.readline().strip()
b = sys.stdin.readline().strip()

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

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

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

Solution (Python):
c11,c12,c13 = list(input())
c21,c22,c23 = list(input())
C = [c11,c12,c13,c21,c22,c23]
invC = [c23,c22,c21,c13,c12,c11]

flag = True
for c,ic in zip(C,invC):
    if c != ic:
        flag = False
        break

if flag:
    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()

a_list = list(a)
b_list = list(b)

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

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

for i in range(3):
    if a[i] != b[2-i]:
        c += 1

if c == 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 = input()
c2 = input()
n = len(c1)
t = True
for i in range(n):
    if c1[i] != c2[n - i - 1]:
        t = False
    
if t:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
def solve():
    C_1 = input()
    C_2 = 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")

solve()

Solution (Python):



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

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

b.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):
s1 = input()
s2 = input()
s2 = s2[::-1]
if s1 == s2:
    print('YES')
else:
    print('NO')

Solution (Python):
if __name__ == '__main__':
    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):
value = list(input())
value2 = list(input())

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

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

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

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

if (s[0] == m[2]) & (s[1] == m[1]) & (s[2] == m[0]) : print("YES")
else : print("NO")

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

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

Solution (Python):

"""
https://beta.atcoder.jp/contests/abc077/tasks/abc077_a

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    a = input().strip()
    b = input().strip()

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


if __name__ == '__main__':
    main(sys.argv[1:])

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



solve()

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

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

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

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

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

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