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):
C1 = list(input())
C2 = list(input())

ans = 'YES'

for i in range(3):
    if C1[i] == C2[-i-1]:
        continue
    else:
        ans = 'NO'
print(ans)

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

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

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

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

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

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

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

print("YES" if c[0] == c[1][::-1] else "NO")

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

Solution (Python):

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

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

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

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

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

Solution (Python):
listC = list(input())
listD = list(input())

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

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

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

Solution (Python):


a  =  input()
b  =  input()

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

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

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

Solution (Python):
c = []

for i in range(2):
    c.append(input())

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

else:
    print("NO")

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

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

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

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

ans = "YES"

if S[0] != T[2]:
    ans = "NO"

if S[1] != T[1]:
    ans = "NO"

if S[2] != T[0]:
    ans = "NO"

print(ans)

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

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

Solution (Python):
c1 = input()
c2 = 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 == c2[2]+c2[1]+c2[0] else "NO")

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

ans = 'YES'
for i in range(3):
    if c1[i] != c2[-(i+1)]:
        ans = 'NO'
        break
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):
a = input()
b = input()
b = b[::-1]
if a == b:
    print('YES')
else:
    print('NO')

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

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

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

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

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

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

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

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

Solution (Python):
C1=list(input())
C2=list(input())
C3=[]
for i in reversed(C2):
    C3.append(i)
print("YES" if C1==C3 else "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
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

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


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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
C = []
C.append(list(input()))
C.append(list(input()))
if C[0] == C[1][::-1]:
    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):
C = input()
C2 = input()

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

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

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

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

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

Solution (Python):
n = 2
C = []
for i in range(n):
    C.append(input())

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

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

Solution (Python):
c = []
for i in range(2):
	c.append(input())

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

Solution (Python):

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

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(reversed(input()))
if a == b:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):
L = list(input())
R = list(input())
L_reverse = L[::-1]
R_reverse = R[::-1]
if L == R_reverse and R == L_reverse:
    print('YES')
else:
    print('NO')

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

Solution (Python):
IN = input()
A, B, C = IN[0], IN[1], IN[2]

IN2 = input()
X, Y, Z = IN2[0], IN2[1], IN2[2]

if A==Z and B==Y and C==X:
    print("YES")
else :
    print("NO")

Solution (Python):


def main():
    a = raw_input()
    b = raw_input()

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


if __name__ == '__main__':
    main()

Solution (Python):
C = [list(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):

def main():
    a = input()
    b = input()


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

if __name__ == "__main__":
        main()

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

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

Solution (Python):


def main():
    c1 = input()
    c2 = input()

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

if __name__ == '__main__':
    main()

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

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

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

print("YES" if c[0] == c[1][::-1] else "NO")

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

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

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

Solution (Python):
M = [list(input()) for _ in range(2)]
flg = True
for i in range(3):
    if M[0][i] != M[1][2 - i]:
        flg = False
        break
print('YES' if flg else 'NO')

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

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

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

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

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

Solution (Python):

n1=str(input())
n2=str(input())
if(n1[0]==n2[2] and n1[2]==n2[0]):
  if(n1[1]==n2[1]):
    print("YES")
  else:
    print("NO")
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 = raw_input()
b = raw_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()
print('YES' if A==B[::-1] else 'NO')

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

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

Solution (Python):
c_11, c_12, c_13 = input()
c_21, c_22, c_23 = input()
if c_11 == c_23 and c_12 == c_22 and c_13 == c_21:
  print('YES')
else:
  print('NO')

Solution (Python):

a=input()
d=input()

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

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

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

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

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

B.reverse()

if A==B:
    print("YES")
else:
    print("NO")

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

C=B[::-1]
D=A[::-1]

if A==C and B==D:
    print("YES")
else:
    print("NO")

Solution (Python):
C = [[x for x in 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):
a=input()
b=input()
if (a+b)==(a+b)[::-1]:
    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):
x=raw_input()
y=raw_input()
if x==y[::-1]:
  print 'YES'
else:
  print 'NO'

Solution (Python):
C1=input().strip()
C2=input().strip()
print("NO YES".split()[int(C1==C2[::-1])])

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

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

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

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

A = list(A)
B = list(B)

a = 0

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

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

Solution (Python):
print('YES' if input() == ''.join([e for e in reversed(list(input()))]) else 'NO')

Solution (Python):
l = input()
m = input()
res = 'YES'


if l[0] != m[2]:
    res = 'NO'
    
if l[1] != m[1]:
    res = 'NO'
    
if l[2] != m[0]:
    res = 'NO'
        
print(res)

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

if c==cc[::-1]:
  print("YES")
else:	
    print("NO")

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

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

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

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

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

Solution (Python):


C = [input(), input()]
if C[0][0] == C[1][2] and C[0][2] == C[1][0] and C[0][1] == C[1][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[2] == Y[0] and X[1] == Y[1]:
    print('YES')
else:
    print('NO')

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
strlist1 = input()
strlist2 = input()

flag = True

for i in range(3):
  if strlist1[i] != strlist2[2 - i]:
    flag = False

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

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

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

Solution (Python):
upper = input()
lower = input()

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

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

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

Solution (Python):
a = str(input())
b = str(input())
res_b = ''

for i in reversed(b):
    res_b += i
else:
    if a == res_b:
        print("YES")
    else:
        print("NO")

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

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

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

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

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

Solution (Python):


C1 = input()
C2 = input()

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

Solution (Python):
S=list(input())
T=list(reversed(input()))
print(["NO","YES"][S==T])

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):
def judge(s1, s2):
	if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
		return 'YES'
	else: return 'NO'

s1 = raw_input()
s2 = raw_input()

print judge(s1, s2)

Solution (Python):
a = list(input())
b = list(input())
c = a+b
d = reversed(c)

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

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

Solution (Python):
def main():
    C11,C12,C13 = input()
    C21,C22,C23 = input()
    if C11==C23 and C21==C13 and C12==C22:
        return "YES"
    else:
        return "NO"
print(main())

Solution (Python):
C1=str(input())
C2=str(input())
C11=C1[0]
C12=C1[1]
C13=C1[2]
C21=C2[0]
C22=C2[1]
C23=C2[2]
if C11==C23 and C12==C22 and C13==C21:
    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()
if C1[0]==C2[2] and C1[1]==C2[1] and C1[2]==C2[0]:
    print ('YES')
else:
    print ('NO')

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
s1 = input()
s2 = input()
if s1 == s2[::-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):
C1=input()
C2=input()

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

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

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

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

Solution (Python):
def rotate(grid):
    return list(map(lambda x: x[::-1], grid))[::-1]


if __name__ == '__main__':
    grid = [input(), input()]
    print('YES') if grid == rotate(grid) else print('NO')

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

a = s[0]
b = s[1]
c = s[2]
d = t[0]
e = t[1]
f = t[2]


if a ==f and b == e and c ==d:
    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()

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

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

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

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

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

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

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

a = input()
b = input()

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

Solution (Python):
import math
import sys

def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

s1 = arr_data[0][0]
s2 = arr_data[1][0]


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

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

for x in range(3):
    if up[x] == down[2-x]:
        result = "YES"
    else:
        result = "NO"
        break
print(result)

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

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

Solution (Python):
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):
upper_list = list(str(input()))
lower_list = list(str(input()))

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

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

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

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

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

for i in range(3):
  if work1[i] != work2[2-i]:
    print('NO')
    break
  if i == 2:
    print('YES')

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





if __name__ == '__main__':
    c = [input() for _ 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):
if input() == input()[::-1]:
    print('YES')
else:
    print('NO')

Solution (Python):

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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]


def dim2input(N):
    li = []
    for _ in range(N):
        li.append(input().split())
    return li



dp = None

def main():
    C = []
    C.append(input())
    C.append(input())

    cond1 = C[0][0] == C[1][2]
    cond2 = C[0][1] == C[1][1]
    cond3 = C[0][2] == C[1][0]

    if cond1 and cond2 and cond3:
        print("YES")
    else:
        print("NO")

main()

Solution (Python):


grid = input()
reverse_grid = input()
if grid[::-1] == reverse_grid:
    print("YES")
else:
    print("NO")

Solution (Python):
def judge(A, B):
  i=0
  if len(A) != len(B):
    return False
  else:
    while i<len(A):
      if A[i] != B[len(B)-i-1]:
        return False
      i+=1
    return True

A=input()
B=input()
 
if judge(A, B):
  print("YES")
else:
  print("NO")

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

if c1[::-1] == c2 and c2[::-1] == c1:
    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 = input()
y = input()
if x == y[::-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]:
    ans = "YES"
else :
    ans = "NO"


print(ans)

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

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

Solution (Python):
a = input()
b = input()
if a[::-1] == b:
  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()
C=B[2]+B[1]+B[0]
if A==C:
    print('YES')
else:
    print('NO')

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

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

Solution (Python):





def main():
    S1 = input()
    S2 = input()

    ok = S1 == S2[::-1]
    print("YES" if ok else "NO")

if __name__ == "__main__": main()

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

Solution (Python):
k = list(raw_input())

l = list(raw_input())

if k[::-1] == l:
    print "YES"
else:
    print "NO"

Solution (Python):
import numpy as np
import pdb

def main():
    row1 = list(raw_input())
    row2 = list(raw_input())

    matoriginal = np.array([row1, row2])
    rotated1 = row2[::-1]
    rotated2 = row1[::-1]
    matrotate = np.array([rotated1, rotated2])

    if np.prod(matoriginal == matrotate):
        print 'YES'
    else:
        print 'NO'


if __name__ == '__main__':
    main()

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

Solution (Python):
x = [input() for i in range(2)]

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

Solution (Python):

a = input()
b = input()[::-1]

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

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

Solution (Python):
S=list(input())
C=list(input())

T=0
for i in range(3):
    if S[i]==C[2-i] and C[i]==S[2-i]:
        T+=1

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

Solution (Python):
s = [raw_input(), raw_input()]
m, n = len(s), len(s[0])
ok = True
for i in range(m):
    for j in range(n):
        if s[i][j] != s[m-i-1][n-j-1]:
            ok = False
print "YES" if ok else "NO"

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

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

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

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

Solution (Python):
import sys
C1 = sys.stdin.readline()
C2 = sys.stdin.readline()
c1 = C1.rstrip()
c2 = C2.rstrip()
c3 = c2[::-1]
if c1 == c3:
    print("YES")
else:
    print("NO")

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