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:
def judge(A, B):
  i=0
  if len(A) != len(B):
    return False
  else:
    while i<len(A):
      if A[i] != B[len(B)-i-1]:
        return False
      i+=1
    return True

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

#整数の入力
#a = int(input())
#b = int(input())
#スペース区切りの整数の入力
#a, b, c = map(int, input().split())
#文字列の入力
s1 = input()
s2 = input()

if s1[0] == s2[2] and s1[1] == s2[1] and s1[2] == s2[0]:
    ans = "YES"
else :
    ans = "NO"

#出力
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-



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

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

if __name__ == "__main__": main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = list(raw_input())

l = list(raw_input())

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

Submission status: Accepted

Solution code:
import numpy as np
import pdb

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c=[input() for i in range(2)]
flag=True

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

Submission status: Accepted

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

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:
# coding: utf-8

# input
a = input()
b = input()

# main
b_r = a[::-1]
a_r = b[::-1]

# output
if a == a_r and b == b_r:
    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 == b[::-1] and b == a[::-1]):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
# coding:utf-8                                                        

a = raw_input()
b = raw_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:
in1 = input()
in2 = input()

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

Submission status: Accepted

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

if (C1[0]==C2[2])&(C1[1]==C2[1])&(C1[2]==C2[0]):
    print("YES")
else:
    print("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:
a = [0,0]
temp = [0,0]

for k in range(2):
    temp[k] = input()
    a[1-k] = temp[k][::-1]

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

Submission status: Accepted

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

if A[2] == B[0] and A[1] == B[1] and A[0] == B[2]:
	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:
a1 = list(input())
a2 = list(input())
a1.reverse()
if (a1 == a2): print("YES")
else: print("NO")

Submission status: Accepted

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

n=0
for i in range(3):
    if  A[i]==B[2-i]:
        n+=1

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

Submission status: Accepted

Solution code:
print "YES" if raw_input() == raw_input()[::-1] else "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:
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:
a = input()
b = input()
a_list = list(a)
b_list = list(b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
first = input()
second = input()
for i in range(3):
    if first[i-1] != second[-i]:
        print('NO')
        break
else:
    print('YES')

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:
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:
one = raw_input()
two = raw_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:

def main():
    matrix = []
    for _ in range(2):
        matrix.append(list(input()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l1 = input()
l2 = input()
flag = 1
for i in range(len(l1)):
    if l1[i] != l2[-i-1]:
        flag = 0
if flag:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
print("YES"*(input()==input()[::-1])or"NO")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
lst1 = list(input())
lst2 = list(input())
new_lst1 = []
new_lst2 = []

for i in range(3):
    new_lst1.extend(lst2[2-i])
    new_lst2.extend(lst1[2-i])
if new_lst1==lst1 and new_lst2==lst2:
    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[0] == B[2] and A[1] == B[1] and A[2] == B[0]:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
#ABC077A

x=raw_input()
y=raw_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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    c = [[t for t in S()] for _ in range(2)]
    c[1].reverse()
    if c[0] == c[1]:
        return 'YES'

    return 'NO'



print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
 
# input
str1=input()
str2=input()
 
if str1 == str2[::-1]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a = input()
b = input()
 
global ans
ans = 1

for i in range(len(a)): 
  if a[i] != b[2-i]:
   ans = 0
   break
 

if ans ==1:
 print('YES')
else:
 print('NO')

Submission status: Accepted

Solution code:
#coding: utf-8

A = input()
B = input()

if A[2] == B[0] and A[1] == B[1] and A[0] == B[2]:
    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:
C1 = list(str(input()))
C2 = list(str(input()))

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

Submission status: Accepted

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

ans = "YES" if result else "NO"
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = input()
alist = list(a)
blist = list(b)
ans = "YES"
for i in range(3):
    if alist[i] == blist[2-i]:
        continue
    else:
        ans =("NO")
print(ans)

Submission status: Accepted

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

res=True
for i in range(2):
    for j in range(3):
        res&=c[i][j]==c[1-i][2-j]
print('YES' if res else 'NO')

Submission status: Accepted

Solution code:
import sys
import random

def rd():
        return sys.stdin.readline().rstrip()

def rdi():
        return [ int(x) for x in rd().split() ]

(c11, c12, c13) = rd()
(c21, c22, c23) = rd()

if c12 == c22 and c11 == c23 and c13 == c21:
        print "YES"
else:
        print "NO"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    c_mat = [[c for c in input()] for _ in range(2)]

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
input1 = input()
input2 = input()

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

c = a[::-1]
d = b[::-1]

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

Submission status: Accepted

Solution code:
a=raw_input()
b=raw_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,b=input(),input();print("YES"if a==b[::-1]else"NO")

Submission status: Accepted

Solution code:
a=input()
a=list(a)
b=input()
b=list(b)
n=len(a)
N=1
for i in range(n):
 if(a[i]!=b[-(i+1)]):
    N=0
if(N==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:
a = input()
b = input()
if a[::-1] == b:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
line1 = list(input())
line2 = list(input())
overall = line1 + line2

gyaku = overall[::-1]

if overall == gyaku:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A_Rotation
def rotation(c1, c2):
	if str(c1) == str(c2)[::-1]:
		print("YES")
	else:
		print("NO")

if __name__ == "__main__":
	c1 = input()
	c2 = input()
	rotation(c1, c2)

Submission status: Accepted

Solution code:
import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

f = S()
s = S()
revf,revs = "",""
for i in range(2,-1,-1):
    revf += s[i]
    revs += f[i]

if f == revf and s == revs:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")
 
 
def main():
    A, B = input(), input()
    print("YES" if A == B[::-1] else "NO")
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = input(),input()
for a,b in zip(A,B[::-1]):
    if a != b:
        print('NO')
        break
else:
    print('YES')

Submission status: Accepted

Solution code:
a=input()
b=input()
aa=a[::-1]

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
c = [ list(input()) for _ in range(2) ] 
a = list(reversed(c[1]))
b = list(reversed(c[0]))
if ''.join(c[0]) == ''.join(a) and ''.join(c[1]) == ''.join(b):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")


def main():
    A, B = input(), input()
    print("YES" if A == B[::-1] else "NO")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S1=str(input())
S2=str(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:
def main():
	c1 = input()
	c2 = input()
	
	if c1[0] == c2[-1] and c1[1] == c2[1] and c1[-1] == c2[0]:
	    print("YES")
	else:
	    print("NO")
        
if __name__ == "__main__": main()

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:
up = input()
down = input()
 
rev_up = up[::-1]
rev_down = down[::-1]
 
if rev_up == down and rev_down == up:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c = [list(input()) for _ in range(2)]
if c[0] == list(reversed(c[1])):
    print('YES')
else:  
    print('NO')

Submission status: Accepted

Solution code:
li_a=list(input())
li_b=list(input())
li_a.reverse()
if li_a == li_b:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
c1 = raw_input()
c2 = raw_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 = list(input())
b = list(input())
if a[0] == b[2] and b[0] == a[2] and a[1]==b[1]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#!/user/bin/python
# coding: UTF-8

c1 = str(raw_input())
c2 = str(raw_input())

c1_list = list(c1)
c1_list.reverse()
if list(c2) == c1_list :
    print 'YES'
else :
    print 'NO'

Submission status: Accepted

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

Submission status: Accepted

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

    S = []
    hoge = []
    for x in reversed(range(3)):
        hoge.append(C[1][x])
    S.append(hoge)
    hoge = []
    for x in reversed(range(3)):
        hoge.append(C[0][x])
    S.append(hoge)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

A = list(input())
B = list(input())
for i in range(3):
    if A[i] != B[2 - i]:
        print("NO")
        sys.exit(0)
print("YES")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
word1 = input()
word2 = input()
point= 0

for i in range(0,3):
    if word1[i] == word2[2-i]:
            point+=1

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

Submission status: Accepted

Solution code:
c = [list(input()) for _ in range(2)]
print("YES" if c[0]==c[1][::-1] else "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:
#!/user/bin/python
# coding: UTF-8

c1 = str(raw_input())
c2 = str(raw_input())

c1_list = list(c1)
c1_list.reverse()
if list(c2) == c1_list :
    print 'YES'
else :
    print '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:
row1 = input()
row2 = input()

moji1 = list(str(row1))
moji2 = list(str(row2))
moji = moji1 + moji2

newmoji = moji[::-1]

if moji == newmoji:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8

c1 = raw_input()
c2 = raw_input()

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

Submission status: Accepted

Solution code:
row1=raw_input()
row2=raw_input()

if row1 == row2[::-1]:
    print "YES"
else:
    print "NO"

Submission status: Accepted

Solution code:
import sys

str1 = sys.stdin.readline()
str2 = sys.stdin.readline()

if str1[0] != str2[2]:
    print ("NO")
elif str1[1] != str2[1]:
    print ("NO")
elif str1[2] != str2[0]:
    print ("NO")
else:
    print ("YES")

Submission status: Accepted

Solution code:
inp1=input().rstrip()
inp2=input().rstrip()

rvs1="".join([inp1[x:x+1] for x in range(2,-1,-1)])
rvs2="".join([inp2[x:x+1] for x in range(2,-1,-1)])

if rvs1==inp2 and rvs2==inp1:
    print("YES",flush=True)
else:
    print("NO",flush=True)

Submission status: Accepted

Solution code:
def A_Rotation(C1, C2):
    C = [C1, C2]
    C_rotate = [C2[::-1], C1[::-1]]
    if C == C_rotate:
        return 'YES'
    else:
        return 'NO'

C1 = input().strip()
C2 = input().strip()
print(A_Rotation(C1, C2))

Submission status: Accepted

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

s2 = s2[::-1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
char1 = input()
char2 = input()
char3 = ""
char4 = ""
for x in reversed(range(3)):
  char3=char3+char2[x]
for y in reversed(range(3)):
  char4=char4+char1[y]
if char2 == char4:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
line1 = input().strip()
line2 = input().strip()

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

Submission status: Accepted

Solution code:
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

def get_row():
    array = []
    txt = raw_input()

    for char in txt:
        array.append(char)

    return array

# defined & initial arrays
cells_top = []
cells_bottom = []

# get cells
cells_top = get_row()
cells_bottom = get_row()

p_dbg(cells_top)
p_dbg(cells_bottom)

# reverse
cells_top.reverse()

p_dbg(cells_top)

# Decision
if(cells_top == cells_bottom):
    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() for i in range(2)]
i=0
while i<3 and C[0][i]==C[1][2-i]:
    i+=1
p="NO"
if i==3:
    p="YES"
print(p)

Submission status: Accepted

Solution code:
x, y = input(), input()
print("YES" if all(xx == yy for (xx, yy) in zip(x, y[::-1])) else "NO")

Submission status: Accepted

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

# input
str1=input()
str2=input()

if str1 == str2[::-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:
# coding: utf-8

def test(c1, c2):
    for i in range(2):
        for j in range(3):
            if c1[i][j] != c2[i][j]:
                return("NO")
    return("YES")

if __name__ == "__main__":
    s1 = input()
    s2 = input()
    s = [s1, s2]
    c1 = [[0,0,0],[0, 0, 0]]
    for i in range(2):
        for j in range(3):
            c1[i][j] = s[i][j]

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

    answer = test(c1, c2)
    print(answer)

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

str1 = input()
str2 = input()
c11, c12, c13 = [i for i in str1]
c21, c22, c23 = [i for i in str2]

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

Submission status: Accepted

Solution code:
def main():
    c = []
    rev_c = []
    N = 2
    for i in range(N):
        s = input()
        c.append(s)
    
    #print(c)
    #print(c[0][::-1])
    #print(c[1][::-1])
    
    for str_ in c:
        rev_c.append(str_[::-1])
    rev_c= rev_c[::-1]
    #print(rev_c)
    
    if(c == rev_c):
        print("YES")
    else:
        print("NO")
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
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:
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:
a = input()
b = input()
for i,j in zip(a,b[::-1]):
    if i != j:
        print("NO")
        break
else:
    print("YES")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from sys import stdin, stdout

def rint():
   return map(int, stdin.readline().split())
#lines = stdin.readlines()

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:
import sys
C1 = input()
C2 = input()
C2 = C2[::-1]
for i in range(3):
    if C1[i] == C2[i]:
        pass
    else:
        print('NO')        
        sys.exit()
print('YES')

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:
# -*- coding: utf-8 -*-

C1=raw_input()
C2=raw_input()

if C1[0]!=C2[2]:
    print 'NO'
elif C1[1]!=C2[1]:
    print 'NO'
elif C1[2]!=C2[0]:
    print 'NO'
else:
    print 'YES'

Submission status: Accepted

Solution code:
# coding: utf-8
C1 = raw_input()
C2 = raw_input()

C = [C1, C2]
C_rev = [C2[::-1], C1[::-1]]

if C == C_rev:
    print 'YES'
else:
    print 'NO'

Submission status: Accepted

Solution code:
import sys

line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")

Submission status: Accepted

Solution code:
A = raw_input()
B = raw_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
up=input()
dw=input()
if up[::-1] == dw:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
input_lines = list(input())
input_lines2 = list(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
a = input()
b = input()

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