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






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)





l = inputSLs(2)

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

Solution (Python):
N = list(input())
K = list(input())

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

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def DD2(d1,d2,init=0): return [[init]*d2 for _ in range(d1)]
def DD3(d1,d2,d3,init=0): return [DD2(d2,d3,init) for _ in range(d1)]

def to_bin(x: int) -> str: return format(x, 'b') 
def to_oct(x: int) -> str: return format(x, 'o') 
def to_hex(x: int) -> str: return format(x, 'x') 
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i): is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
def prime_factor(n):
    """Return a list of prime factorization numbers of n"""
    res = []
    for i in range(2,int(n**0.5)+1):
        while n%i==0: res.append(i); n //= i
    if n != 1: res.append(n)
    return res

from itertools import accumulate as acc, combinations as combi, product, combinations_with_replacement as combi_dup
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left


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

if __name__ == '__main__':
    main()

Solution (Python):
C11C12C13=input()
C21C22C23=input()
if (C11C12C13[0]==C21C22C23[2] and C11C12C13[2]==C21C22C23[0] and C11C12C13[1]==C21C22C23[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):
import sys
import math
import bisect

def main():
    s = input()
    t = input()
    if s == t[::-1]:
        print('YES')
    else:
        print('NO')
    
if __name__ == "__main__":
    main()

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

ans = 'YES'
for i in range(1, len(C1)+1):
    if C1[i-1] != C2[-i]:
        ans = 'NO'

print(ans)

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

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

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

Solution (Python):
C=[0,0]
A=[0,0]
C[0]=list(input())
C[1]=list(input())
A[1]=[C[0][-1],C[0][-2],C[0][-3]]
A[0]=[C[1][-1],C[1][-2],C[1][-3]]
print('YES' if A==C else 'NO')

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

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

Solution (Python):
def ABC_77_A():
    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__':

    ABC_77_A()

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] and C[1][0] == C[0][2] and C[1][1] == C[0][1] and C[1][2] == C[0][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):
C = [input(), 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):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

c = [rs() for _ in range(2)]
c2 = [i[::-1] for i in c[::-1]]
print('YES' if c == c2 else 'NO')

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

if __name__ == '__main__':
    main()

Solution (Python):
def resolve():
	s = [input() for _ in range(2)]
	if s[0] == s[1][::-1]:
		print('YES')
	else:
		print('NO')
resolve()

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

Solution (Python):
s1=input()
s2=input()
s3=s2[::-1]

if s1==s3:
    print("YES")
else:
    print("NO")

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

cnt=0
for i in range(len(s1)):
    if s1[i]==s2[-i-1]:
        cnt+=1

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

Solution (Python):

c = input()
d = input()

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

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

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

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

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

Solution (Python):
import sys
C1 = input()
C2 = input()
if C1[0] != C2[2]:
    print('NO')
    sys.exit()
else:
    if C1[1] != C2[1]:
        print('NO')
        sys.exit()
    else:
        if C1[2] != C2[0]:
            print('NO')
            sys.exit()
print('YES')

Solution (Python):
C = list(input() for i in range(2))
A = C[0]
B = C[1][::-1]

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

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

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

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

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

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


c = input()
d = input()

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

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a = input()
b = input()

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

new_line2 = line2[::-1]

if line1 == new_line2:
  print('YES')
else:
  print('NO')

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

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

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

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

if C1==C2R:
  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()

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

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

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

Solution (Python):
a = input()
b = input()
if b == a[::-1] and 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):
s = input()
t = input()
print(['NO', 'YES'][int(s[::-1] == t)])

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

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

Solution (Python):


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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque

from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]



s=input().rstrip()
s2=input().rstrip()
if s[0]==s2[2] and s[1]==s2[1] and s[2]==s2[0]:
    print("YES")
else:
    print("NO")

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

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

Solution (Python):
c1=str(input())
c2=str(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):
import numpy as np

up_ = np.array(list(reversed(input())))
lo = np.array(list(input()))

if (up_ == lo).all():
  print('YES')
else:
  print('NO')

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

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):
import sys
input = sys.stdin.readline

def main():

  r1 = input().rstrip()
  r2 = input().rstrip()

  if r1 == r2[::-1]:
    print('YES')
  else:
    print('NO')
  
if __name__ == "__main__":
  main()

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):
text=input()
text1=input()
l=[]
for i in text:
    l.insert(0,i)
t=''
for i in l:
    t+=i
    
    

if (t==text1):
    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=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):
c1 = list(input())
c2 = list(input())

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

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

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

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):
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):
s = input()
t = input()
cnt = 0
if s[0] == t[2]:
    cnt += 1

if s[1] == t[1]:
    cnt += 1

if s[2] == t[0]:
    cnt += 1

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

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

print(ans)

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

s = [list(input())[:-1] for i in range(2)]

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

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

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

def resolve():
    C = [input(), 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")


if '__main__' == __name__:
    resolve()

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

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

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

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

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

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

Solution (Python):
S1=str(input())
S2=str(input())
if S1 == S2[2]+S2[1]+S2[0]:
  print('YES')
else:
  print('NO')

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

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

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

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

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

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

print("YES" if c1==c2[::-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):
a = list(input())
b = list(input())
if a == list(reversed(b)):
    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):



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

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

for i in range(3):
    if c[2 - i] != d[i]:
        print("NO")
        exit()

print("YES")

Solution (Python):
from sys import stdin

s1=input()
s2=input()
s2=s2[::-1]

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

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

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

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

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

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

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

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

Solution (Python):
icase=0    
if icase==0:
    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):
import sys
x = input()
y = input()

for i in range(3):
  if x[i] != y[2-i]:
    print("NO")
    sys.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):
input1 = input()
input2 = input()
if input1[0] == input2[2] and input1[1] == input2[1] and input1[2] == input2[0]:
  print('YES')
else:
  print('NO')

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

Solution (Python):
def main():
    r1 = input()
    r2 = input()
    r1 = r1[::-1]

    if r1 == r2:
        print("YES")
    else:
        print("NO")
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,b = (input() for _ in range(2))
print('YES' if list(a) == list(reversed(b)) else 'NO')

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

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

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

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

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

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

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

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

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

c0=[]
for i in range(3):
  c0.append(c[0][i])
c1=[]
for i in range(3):
  c1.append(c[1][i])
  
if c0[0]==c1[2] and c0[1]==c1[1] and c0[2]==c1[0]:
  print('YES')
else:
  print('NO')

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

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

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

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

    s2 = s2[::-1]

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A = list(iss())
    B = list(iss())
    print('YES' if A[2] == B[0] and A[1] == B[1] and A[0] == B[2] else 'NO')


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 

def resolve():
    C = [input() for _ in range(2)]

    ok = True
    for i in range(3):
        if C[0][i] != C[1][2-i]:
            ok = False
    if ok:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    resolve()

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

c = a[::-1]

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

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

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

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

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

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

Solution (Python):
a = input()
b = input()
for i in range(3):
  if a[i] != b[-(i+1)]:
    print("NO")
    exit()
print("YES")

Solution (Python):
s_1 = input()
s_2 = input()
if s_1[0] == s_2[2] and s_1[1] == s_2[1] and s_1[2] == s_2[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):
S0 = input()
S1 = input()

ans = "YES"
for i in range(3):
    if S0[i] != S1[2-i]:
        ans ="NO"
        break

print(ans)

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

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

Solution (Python):
import itertools
def main():
  s1 = input()
  s2 = input()
  print("YES" if s1 == s2[::-1] else "NO")
if __name__ == '__main__':
  main()

Solution (Python):
C11, C12, C13 = map(str, input())
C21, C22, C23 = map(str, input())
if C11+C12+C13==C23+C22+C21:
    print('YES')
else:
    print('NO')

Solution (Python):
def main():
    cs = [list(input()) for _ in range(2)]
    ul = cs[0][0]
    uc = cs[0][1]
    ur = cs[0][2]
    bl = cs[1][0]
    bc = cs[1][1]
    br = cs[1][2]

    if ul == br and uc == bc and ur == bl:
        ans = 'YES'
    else:
        ans = 'NO'

    print(ans)


if __name__ == "__main__":
    main()

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):
C = [list(input()) for _ in range(2)]
D = [list(reversed(C[1])), list(reversed(C[0]))]

ans = 'YES' if C == D else 'NO'
print(ans)

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