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

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

Solution (Python):
C1,C2,C3 = input()
C4,C5,C6 = input()
print('YES' if ''.join([C1,C2,C3]) == ''.join([C6,C5,C4]) else 'NO')

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

Solution (Python):
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()

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

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

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

Solution (Python):


YES = "YES"  
NO = "NO"  



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

if __name__ == '__main__':
    main()

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

row1 = s()
row2 = s()

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

Solution (Python):

import sys

YES = "YES"  
NO = "NO"  


def solve(upper: str, lower: str):

    if upper == lower[::-1] and lower == upper[::-1]:
        print(YES)
    else:
        print(NO)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    upper = str(next(tokens))  
    lower = str(next(tokens))  
    solve(upper, lower)


if __name__ == '__main__':
    main()

Solution (Python):
S1 = input()
S2 = input()
print('YES' if S1 == S2[::-1] else '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):
a, b = input(), 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):
s1=input()
s2=input()
if s1==s2[::-1]:
  print('YES')
else:
  print('NO')

Solution (Python):
print('YES' if list(input()) == list(reversed(input())) 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):



word1 = input()
word2 = input()

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

Solution (Python):



word1 = input()
word2 = input()

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

Solution (Python):
s=input()
t=input()
print('YES' if s[0]==t[2] and s[1]==t[1] and s[2]==t[0] else '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):
U = input()
D = input()
if U[0] == D[2] and U[1] == D[1] and U[2] == D[0]:
    print('YES')
else:
    print('NO')

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

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

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

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

r1 = c1[::-1]
r2 = c2[::-1]

if c1 == r2 and c2 == r1:
  print("YES")
else:
  print("NO")

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

u = t[::-1]
v = s[::-1]

print("YES" if s == u and t == v 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):
x = list(str(input()))
y = list(str(input()))
x.reverse()
if x == y :
    print('YES')
else :
    print('NO')

Solution (Python):


def main():
    a = [list(input()) for i in range(2)]
    b = [a[1][::-1], a[0][::-1]]

    

    if a == b:
        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):
def abc():
    upper = input()
    lower = input()

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


abc()

Solution (Python):

up = input()
down = input()

down_re = ""

for i in down:
    down_re = i + down_re
    
if up == down_re:
    print ("YES")
    
else:
    print ("NO")

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

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

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


main()

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

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

Solution (Python):


s1, s2 = input(), input()

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

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

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

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

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

Solution (Python):











import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    C = [ST() for _ in range(2)]
    for i in range(3):
        if C[0][i] != C[1][2 - i]:
            print("NO")
            exit()
    print("YES")
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):
a = input()
b = input()

a_rev = ''.join(list(reversed(a)))


if(b == a_rev):
    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()
newS1 = S2[2]+S2[1]+S2[0]
newS2 = S1[2]+S1[1]+S1[0]
if S1 == newS1 and S2 == newS2: print('YES')
else: print('NO')

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

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

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

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

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

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

Solution (Python):
c1 = input()
c2 = input()
c2 = c2[::-1]
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):
l=input()
m=input()
print("YES" if m==l[::-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):
x=input()
y=input()

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

else:
    print("NO")

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

Solution (Python):

import sys
import math
input = sys.stdin.readline

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

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

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

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

Solution (Python):
s = list(input())
t = list(input())
t.reverse()
print("YES" if s == t 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):
c1 = input()
c2 = input()

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

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

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

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

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

Solution (Python):
s=input()
t=input()
print("YES" if s==t[::-1] else "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):
import sys
read = lambda: sys.stdin.readline().rstrip()
s1 = read()
s2 = read()
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()
flag = True

for i in range(len(s1)):
    if s1[i] != s2[len(s2)-i-1]:
        print('NO')
        flag = False
        break

if flag:
    print('YES')

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

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):
print("YNEOS"[list(input())!=list(reversed(list(input())))::2])

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):
import sys
s=input()
t=input()
for c in range(3):
    if s[c]!=t[2-c]:
        print("NO")
        sys.exit(0)
print("YES");

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

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

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








a=str(input())
b=str(input())

if a[0] == b[-1] and a[1] == b[-2] and a[2] == b[-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):
c1 = input()
c2 = input()
if c1[::-1] == c2:
  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):
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=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())
m = list(input())
if int(l[0]==m[2]) & int(l[1]==m[1]) & int(l[2]==m[0]):
  print("YES")
else:
  print("NO")

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

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

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

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

Solution (Python):
A = [list(input()) for _ in range(2)]
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):
print("YES" if "".join(reversed(input()))==input() else "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):
a,b = [input() for i in range(2)]
if a[0] == b[2] and a[1]==b[1] and a[2] == b[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):
l=input()
l1=input()
if l[0]==l1[-1] and l[1]==l1[1] and l[2]==l1[0]:
  print("YES")
else:
  print("NO")

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a1 = list(_ for _ in input())
    a2 = list(_ for _ in input())
    if a2[2] == a1[0] and a1[1] == a2[1] and a1[2] == a2[0]:
        print('YES')
    else:
        print('NO')
    
if __name__ == '__main__':
    main()

Solution (Python):
listA=list(input())
listB=list(input())
print('YES' if list(reversed(listA)) == listB 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 = str(input())
b = str(input())

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

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

Solution (Python):


import sys
import math


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

def read_input():
    s1 = input()
    s2 = input()
    return s1, s2


def submit():
    s1, s2 = read_input()
    s2 = s2[::-1]

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

if __name__ == '__main__':
    submit()

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s1 = input()
    s2 = input()

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

solve()

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

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

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

Solution (Python):
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):
u = input()
s = input()
print('YES' if (u[0]==s[2])&(u[1]==s[1])&(u[2]==s[0]) else 'NO')

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

for i in range(3):
  if s[i] != t[2-i]:
    print('NO')
    break
else: 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 numpy as np

s=input()
t=input()

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

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

Solution (Python):
c = list(input())
d = list(input())
print("YES" if c[0] == d[2] and c[2] == d[0] and c[1] == d[1] else "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=input()
c2=input()
c1_re=c1[::-1]
c2_re=c2[::-1]
if c2_re==c1 and c1_re==c2:
    print("YES")
else:
    print("NO")

Solution (Python):
a=input()
b=input()
a1=a[0]
a2=a[1]
a3=a[2]
b1=b[0]
b2=b[1]
b3=b[2]
if a1==b3 and a2==b2 and a3==b1:
    print("YES")
else:
    print("NO")

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

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

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

Solution (Python):
x = input()
y = input()
print("YES" if x==y[::-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()
Aarray=[]
Barray=[]
for i in a:
    Aarray.append(i)
for i in b:
    Barray.append(i)

if Aarray==list(reversed(Barray)):
    print("YES")
else:
    print("NO")

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

Solution (Python):

a = input()
b = input()

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

Solution (Python):
f_floor=input()
s_floor=input()

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

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

ar=a[::-1]
br=b[::-1]

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

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

if A[2] == B[0] and A[0] == B[2] and A[1] == 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):
x = str(input())
y = str(input())
if x == y[::-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):
X = str(input())
Y = str(input())

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

Solution (Python):
l1 = list(input())
l2 = list(input())

L1 = l1[::-1]
L2 = l2[::-1]

if l1 == L2 and l2 == L1:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):


a, b = [input() for _ in range(2)]

count = 0

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

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

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

Solution (Python):
a = input()
b = input()
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 == T[::-1]:
    print('YES')
else:
    print('NO')

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

Solution (Python):
arr = []
for i in range(2):
	arr += list(map(str,input().split()))
	
def reverce(org):
	ls_rev_org = []
	ls_org = list(org)
	for i in range(1,len(org)+1):
		ls_rev_org += ls_org[-i]
	return ''.join(ls_rev_org)

rev_org = reverce(arr[0])

if rev_org == arr[1]:
	print('YES')
else:
	print('NO')

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


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


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

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

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

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

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

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

Solution (Python):
import sys
c = []
c.append(input())
c.append(input())
for i in range(2):
    for j in range(3):
        if c[i][j] != c[1-i][2-j]:
            print('NO')
            sys.exit()
print('YES')

Solution (Python):

a, b = [input().rstrip() for _ in range(2)]
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):
s=input()
t=input()
print("YES" if s[::-1]==t 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):
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, b = list(input()), 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() for i in range(2)]
ans = 'NO'
if c[0][0] == c[1][2] and c[0][1] == c[1][1] and c[0][2] == c[1][0]:
    ans = 'YES'
print(ans)

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

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

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

Solution (Python):
c11, c12, c13 = list(input())
c21, c22, c23 = list(input())
if c11 == c23 and c12 == c22 and c13 == c21:
    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())
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):
A = input()
B = input()

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

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

Solution (Python):
s = [input() for _ in [0,0]];print("YNEOS"[s[0][0] != s[1][2] or s[0][1] != s[1][1] or s[0][2] != s[1][0]::2])

Solution (Python):
print(["YES", "NO"][not("".join(reversed(input())) == input())])

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

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

Solution (Python):
c_1 = str(input())
c_2 = str(input())
tmp = c_1[2] + c_1[1] + c_1[0]
if tmp == c_2:
  print("YES")
else:
  print("NO")

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

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

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

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

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

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

C_r = np.array([['0']*3 for i in range(2)])
for i in range(2):
    for j in range(3):
        C_r[1-i, 2-j] = C[i, j]

if np.all(C==C_r):
    print('YES')
else:
    print('NO')

Solution (Python):

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

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

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

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

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

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

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

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

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

C1a = C1[2]+C1[1]+C1[0]
C2a = C2[2]+C2[1]+C2[0]

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

Solution (Python):
from sys import exit



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

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

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

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

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

Solution (Python):
def solve(string):
    c = string.split()
    return "YES" if c[0] == c[1][::-1] else "NO"


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

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

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

Solution (Python):
a=[]
b=[]
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 == b[::-1]:
    print('YES')
else:
    print('NO')

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

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

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

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

Solution (Python):
A=input();B=input()
for i in range(len(A)):
    j=2-i
    if A[i]!=B[j]:
        print('NO')
        exit()
print('YES')

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

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

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

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

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

Solution (Python):


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

c2.reverse()

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

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

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

Solution (Python):
s=[input() for x in range(2)]
print('YES' if s[0] == s[1][::-1] else '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 = input()
C2 = input()
if(C1[0]==C2[2] and C2[0]==C1[2] and C1[1]==C2[1]):
  print('YES')
else:
  print('NO')