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



Sample input:
pot
top


Sample output:
YES

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

a = input()
b = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=list(input())
R=list(input())
if L[0]==R[2] and L[1]==R[1] and L[2]==R[0]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

t = input()
b = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for x,y in zip(input(),reversed(input())):
  if x!=y:
    print('NO')
    break
else:
  print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

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

C1 = input()
C2 = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
c = input()
d = input()

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

Submission status: Accepted

Solution code:
#n=int(input())
#a,b=map(int,input().split())
l1=list(input())
l2=list(input())
#l=[list(map(int,input().split())) for i in range(2)]
if l1 == l2[::-1]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
C = ""
for i in range(2):
    C += input()
    
if list(C) == list(reversed(C)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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

    return True

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

Submission status: Accepted

Solution code:
a = input()
b = ''.join(list(reversed(input())))
if a == b:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c1.reverse()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

one = S()
two = S()

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

Submission status: Accepted

Solution code:
C1=input()
C2=input()
C1new="".join(list(reversed(C1)))
C2new="".join(list(reversed(C2)))
if (C1==C2new)&(C2==C1new):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

print(['NO','YES'][c11==c23 and c12==c22 and c13==c21])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = "".join(reversed(input()))
T = "".join(input())

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
c1 = S()
c2 = S()
if c1 == c2[::-1]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
c_1 = list(input())
c_2 = list(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')

Submission status: Accepted

Solution code:
import sys

C1 = input()
C2 = input()[::-1]


for i in range(len(C1)):
  if C1 != C2:
    print("NO")
    sys.exit()

print("YES")

Submission status: Accepted

Solution code:
C = [input() for _ in range(2)]
f = C[0][0] == C[1][2] and C[0][1] == C[1][1] and C[1][0] == C[0][2]
if f:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
def resolve():
    li = list()
    for i in range(2):
        line = input()
        li.append(line)
    ans = list()
    for i in range(2):
        line = li[1-i]
        al = line[2] + line[1] + line[0]
        ans.append(al)
    sp = ""
    for i in range(2):
        if ans[i] != li[i]:
            sp = "NO"
            break
    if sp != "NO":
        sp = "YES"
    print(sp)
resolve()

Submission status: Accepted

Solution code:
A=input()
B=input()
count=0
if A[0]==B[2]:
    if A[1]==B[1]:
        if A[2]==B[0]:
            count+=1
if count>0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

c1 = input().rstrip()
c2 = input().rstrip()[-1::-1]

print('YES' if c1 == c2 else 'NO')

Submission status: Accepted

Solution code:
C1 = input()
#print(C1)
C2 = input()

#print(C1[4])

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

Solution code:
x = list(input())
y = list(reversed(list(input())))
if x == y:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
C = []
C.append(input())
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")

Submission status: Accepted

Solution code:
c1 = list(input())
c2 = str(input())

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

Submission status: Accepted

Solution code:
x = input()
y = input()

x = list(x)
y = list(y)
x_ = x
y_ = y
x_ = reversed(x)
y_ = reversed(y)
x_ = list(x_)
y_ = list(y_)


if y_ == x and x_ == y:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

C = sInLV(2)

b1 = C[0][0] == C[1][2]
b2 = C[0][1] == C[1][1]
b3 = C[0][2] == C[1][0]

ans = 'YES' if b1 and b2 and b3 else 'NO'

print(ans)

Submission status: Accepted

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

C3 = C1[::-1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = input(),input()
if (a[0]==b[2])&(a[1]==b[1])&(a[2]==b[0]):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=list(input())
ll=list(input())
if (l[0]==ll[2] and l[1]==ll[1] and l[2]==ll[0]):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
U=input()
B=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
C1 = list(input())
C2 = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[x for x in input()]
b=[x for x in input()][::-1]
print('YES' if a==b else 'NO')

Submission status: Accepted

Solution code:
s_1 = input()
s_2 = input()
ans = "YES"
if s_1[0] != s_2[2] or s_1[1] != s_2[1] or s_1[2] != s_2[0]:
    ans = "NO"

print(ans)

Submission status: Accepted

Solution code:
U=input()
B=input()

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

Submission status: Accepted

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

c11 = C1[0]
c12 = C1[1]
c13 = C1[-1]

c21 = C2[0]
c22 = C2[1]
c23 = C2[-1]

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

else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

l = [c1, c2]
ll = [[x for x in reversed(c2)] , [x for x in reversed(c1)]]

if l == ll:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

if l == ll:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a = input()
b = input()
if a[0] == b[2]:
    if a[1] == b[1]:
        if a[2] == b[0]:
            print("YES")
            exit()
print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

Submission status: Accepted

Solution code:
c = input()
d = input()[::-1]

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

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
c1=input()
c2=input()
for i in range(3):
  if c1[2-i]!=c2[i]:
    print("NO")
    break
else:
  print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = str(input())
A = list(A)
B = str(input())
B = list(B)

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque
import math

# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)

def solve():
    s1 = getS()
    s2 = getS()
    # print("".join(reversed([c for c in s1])))
    if "".join(reversed([c for c in s1])) == s2:
        print("YES")
    else:
        print("NO")
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    # main()
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c = [list(input()) for _ in range(2)]
ans = "NO"
if c[0][::-1] == c[1]:
    ans = "YES"
print(ans)

Submission status: Accepted

Solution code:
c_1 = input()
c_2 = input()
rotate_1 = c_1[::-1]
rotate_2 = c_2[::-1]
if c_1 == rotate_2 and c_2 == rotate_1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,b=open(0).read().split();print("YES" if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(s1, s2):
    if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
        return 'YES'

    return 'NO'


s1 = input()
s2 = input()
print(actual(s1, s2))

Submission status: Accepted

Solution code:
x = input()
y = input()
t = ''
for i in range(3):
  t = x[i] + t
if t == y:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
C = [input() for _ in range(2)]
for i in range(3):
    if C[0][i] != C[1][2-i]:
        print("NO")
        break
else: print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=list(input())
b=list(input())
b.reverse()
print('NYOE S'[a==b::2])

Submission status: Accepted

Solution code:
a=input();b=input();print(['NO','YES'][a==b[::-1]])

Submission status: Accepted

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

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