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

Submission status: Accepted

Solution code:
import sys
C = []
D = []

for _ in range(2):
    l = list(input())
    C.append(l)

count = 0
for i in range(1,-1,-1):
    D.append([])
    for j in range(2,-1,-1):
        D[count].append(C[i][j])

    count = count + 1
for i in range(2):
    for j in range(3):
        if C[i][j]!=D[i][j]:
            print("NO")
            sys.exit()
print("YES")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s1, s2 = sys.stdin.read().split()

def main():
    return 'YES' if s1[::-1] == s2 else 'NO'

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
s = input()
a = input()
s_list = ([i for i in s])
a_list = ([j for j in a])
a_list[0],a_list[2] = a_list[2],a_list[0]
if s_list == a_list:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input() + input()
# print(s)

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

Submission status: Accepted

Solution code:
s = str(input())
t = str(input())
tmp = 0

for i in range(3):
    if s[i]==t[2-i]:
        tmp += 1

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
S = list(input())
T = list(input())
ans = "NO"

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

Submission status: Accepted

Solution code:
import sys

x = input()
y = input()

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

Submission status: Accepted

Solution code:
import sys

x = [input() for _ in range(2)]

for i in range(3):
    flag = True
    if x[0][i] != x[1][2-i]:
        flag = False
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if list(str(input())) == list(reversed(str(input()))) :
  print("YES")
else :
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1 = str( input() )
s2 = str( input() )
s1r = s1[::-1]

print( [ "NO", "YES" ][ s1r == s2 ] )

Submission status: Accepted

Solution code:
a=input()
b=input()
c=a[::-1]
if c==b:
  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:
s = input()
l = input()
if s[0] == l[2] and s[1] == l[1] and s[2] == l[0]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
c1 = input()
c2 = 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:
a=input()
b=input()
if a==b[::-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
import bisect

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
s = ''
for i in range(2):
    s += input()
if s == s[::-1]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
C1 = input()
C2 = 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:
s = str(input())
t = str(input())

if s[2]==t[0] and s[1]==t[1] and s[0]==t[2]:
    ans = 'YES'
else:
    ans = 'NO'

print(ans)

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:
C_1 = list(input())
C_2 = list(input())
C_1.reverse()
print('YES') if C_1==C_2 else print('NO')

Submission status: Accepted

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

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

if a=="{}{}{}".format(b[2],b[1],b[0]):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

if X == Y[::-1] and Y == X[::-1]:
    print("YES")
else:
    print("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:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

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()
print(" YNEOS"[b[::-1]==a::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
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,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

if  __name__=='__main__':
	main()

Submission status: Accepted

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

REA = (A[0] + A[1] + A[2])
REB = (B[2] + B[1] +B[0])

if REA == REB:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# ABC077a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

Submission status: Accepted

Solution code:
##### 解けた #####

import numpy as np

C=np.full((2,3),".",np.str)
C[0,:]=list(input())
C[1,:]=list(input())
Cr=np.rot90(C,k=2) # 180度回転させたもの

if (C==Cr).all(): # 180度回転させて一致するなら
    print("YES")
else: # 一致しないなら
    print("NO")

Submission status: Accepted

Solution code:
import sys


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

    for i in range(3):
        if C[0][i] == C[1][2-i]:
            continue
        else:
            print('NO')
            sys.exit()

    else:
        print('YES')


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
C1 = [i for i in input()]
C2 = [i for i in input()]
C2.reverse()
if C1 == C2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

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

main()

Submission status: Accepted

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

#入力
C1 = str(input())
C2 = str(input())
C3 = C2[2] + C2[1] + C2[0]

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

Submission status: Accepted

Solution code:
upper = list(input())
lower = list(input())
ans = "YES"
for i in range(3):
  if upper[i] != lower[-i-1]:
    ans = "NO"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import bisect
import heapq
import numpy as np
from math import factorial

s = stdin.readline().rstrip()
t = stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
import numpy as np
arr = np.array(
  [
  	list(input().strip())
    for _ in range(2)
  ]
)

print("YES" if (arr == arr[::-1,::-1]).all() 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:
ls_c = [[i for i in input()] for j in range(2)]

if (ls_c[0][0] == ls_c[1][2]) and (ls_c[0][2] == ls_c[1][0]) and (ls_c[0][1] == ls_c[1][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:
def examA():
    C = [S() 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]:
        ans = "YES"
    else:
        ans = "NO"
    print(ans)

import sys,copy,bisect,itertools
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
s1 = (stdin.readline().rstrip())
s2 = (stdin.readline().rstrip())
if s1 == s2[::-1]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#77a
Cone = str(input())
Ctwo = str(input())

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

Submission status: Accepted

Solution code:
S1 = str(input())
S2 = str(input())

S1 = S1[::-1]


if S1 == S2:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = list(a)
d = list(b)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print('YES' if input() == ''.join([s for s in input()[::-1]]) else 'NO')

Submission status: Accepted

Solution code:
a = list(map(str, input()))
b = list(map(str, 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=str(input())
b=str(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:
s = input()
t = input()
if s == t[::-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()
c2 = 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:
c1 = list(input())
c2 = list(input())
c2_alta = [0 for i in range(3)]
c2_alta[0] = c2[-1]
c2_alta[1] = c2[1]
c2_alta[-1] = c2[0]
if c1 == c2_alta:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
#Rotation
a,b,c = input()
d,e,f = input()
if a != f:
    print("NO")
elif b != e:
    print("NO")
elif c != d:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:

import sys
# import collections
# import math
# import string
# import bisect

def main():
    c1, c2 = sys.stdin.read().split()
    print('YES' if c1 == c2[::-1] else 'NO') 

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = []
for _ in range(2):
  li.append(input())
  
if li[0] == li[1][::-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:
import sys
C = [[str(c) for c in l.strip()] for l in sys.stdin]
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:
# -*- coding: utf-8 -*-
c1 = input()
c2 = 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:
# A - Rotation
grids = [input() for _ in range(2)]
print('YES' if grids[1][::-1] == grids[0] and grids[0][::-1] == grids[1] else 'NO')

Submission status: Accepted

Solution code:
l1 = list(map(str, input()))
l2 = list(map(str, input()))
if l1[0]==l2[2] and l1[1]==l2[1] and l1[2]==l2[0]:
  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:
c1 = input()
c2 = input()
if c1 == c2[::-1]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
C1=list(input())
C2=reversed(input())
print('YES' if all(c1==c2 for c1,c2 in zip(C1,C2)) else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
C1 = list(input())
C2 = list(input())
tmp = []
for i in range(3):
    tmp.append(C1[-i-1])
if C2 == tmp:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

 
a_reversed = ''.join(list(reversed(a)))
b_reversed = ''.join(list(reversed(b)))


if a == b_reversed and b == a_reversed:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
c1=input()
c2=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:
c1 = input()
c2 = 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:
s1, s2 = input(), input()
if s1[0]==s2[2] and s1[1]==s2[1] and s1[2]==s2[0]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
list1 = list(input())
list2 = list(input())

for i in range(len(list1)):
    if list1[i] != list2[len(list2)-1-i]:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

Solution code:
a,b,c=map(str, input())
x,y,z=map(str, input())
if a==z and b==y and c==x:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,b=[input() for _ in range(2)]
print("YES" if a == b[::-1] else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1 = [i for i in input()]
x2 = [j for j in input()]
x2.reverse()

if x1 == x2:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
t= list(input())
t = t[::-1]
if s==t:
  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:
# ABC077 A - Rotation
S1 = input()
S2 = input()

s1 = S1[0:1]
s2 = S1[1:2]
s3 = S1[2:3]
s4 = S2[0:1]
s5 = S2[1:2]
s6 = S2[2:3]

if s1==s6 and s2==s5 and s3==s4:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
c1=input()
c2=input()
for i in range(3):
  if c1[i]==c2[-1-i]:
    continue
  else:
    print("NO")
    exit(0)
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:
h = input()
l = input()
print("YES" if h[0] == l[2] and l[0] == h[2] and h[1] == l[1] else "NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [input() for i in range(2)]
print("NYOE S"[(a[0] == b[2] and a[1] == b[1] and a[2] == b[0])::2])

Submission status: Accepted

Solution code:
s=str(input())
t=str(input())
t=t[::-1]
print('YES' if s==t else '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()
print('YES' if a[::-1] == b else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
one = list(input())
two = list(input())
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:
a = [input().split() for l in range(2)]


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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    c1=STR()
    c2=STR()
    if c1[0]==c2[2] and c1[1]==c2[1] and c1[2]==c2[0]:
        print('YES')
    else:
        print('NO')
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
c1, c2, c3 = list(input())
c4, c5, c6 = list(input())

flag = True
for x, y in [(c1, c6), (c3, c4), (c2, c5)]:
    if x != y:
        flag = False
if flag:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

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

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:
C1 = input()
C2 = 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:
C=input()+input();print('NYOE S'[C[0]==C[5] and C[1]==C[4] and C[2]==C[3]::2])

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:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    t = str(input().rstrip('\n'))
    b = True
    for i in range(len(s)):
        if t[i] != s[-i-1]:
            b = False
            break
    print("YES" if b else "NO")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()
T = input()
for i in range(len(S)):
    if S[len(S)-i-1] != T[i]:
        print("NO")
        exit()
print("YES")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#2019/09/25
c1 = input()
c2 = input()
print("YES" if c1 == c2[::-1] else "NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c1=input()
c2=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:
a=input()
b=input()
print('YES' if a==b[::-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:
c1 = list(input())
c2 = list(input())
d1 = c1[0] == c2[2]
d2 = c1[1] == c2[1]
d3 = c1[2] == c2[0]
if d1 and d2 and d3:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
c1 = list(input())
c2 = list(input())
c1_r = [c1[2],c1[1],c1[0]]
if c1_r == c2:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
ccc1 = list(input())
ccc2 = list(input())
for i, _ in enumerate(ccc1):
    if _ != ccc2[-i-1]:
        print("NO")
        break
    if i == 2:
        print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = input()
yes = True
for i in range(len(a)):
    if a[i] != b[len(a) - 1 - i]:
        yes = False
        break
        
if yes:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    

a=input()
b=input()

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

Submission status: Accepted

Solution code:
c_list = [input() for i in range(2)]

reversed_c_list = []
for s in reversed(c_list[0]):
    reversed_c_list.append(s)

normal_c_list = []
for s in c_list[1]:
    normal_c_list.append(s)


if reversed_c_list == normal_c_list:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

S.reverse()
if S==T:print('YES')
else:print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s0 = input().rstrip()
s1 = input().rstrip()
if s0 == s1[::-1] and s0[::-1] == s1:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

c1 = input()
c2 = input()
c = list(c1+c2)

if c[0] == c[5] and c[1] == c[4] and c[2] == c[3]:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
x=input()
y=input()
x1=list(x)
x2=list(y)

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

Submission status: Accepted

Solution code:
C1 = input()
C2 = 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:
grid = [input() for _ in range(2)]

if grid == list(map(lambda row: row[::-1], grid))[::-1]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c22 = c2[2]+c2[1]+c2[0]

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

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

Submission status: Accepted

Solution code:
A,B=input(),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[0]==Y[2] and X[1]==Y[1] and X[2]==Y[0] else 'NO')