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

YES = "YES"  # type: str
NO = "NO"  # type: str


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    a = input()
    b = input()
    if a == b[::-1]:
        print(YES)
    else:
        print(NO)
    # Failed to predict input format
    pass

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

row1 = s()
row2 = s()

if row1 == row2[::-1] and row2 == row1[::-1]:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

YES = "YES"  # type: str
NO = "NO"  # type: str


def solve(upper: str, lower: str):

    if upper == lower[::-1] and lower == upper[::-1]:
        print(YES)
    else:
        print(NO)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    upper = str(next(tokens))  # type: str
    lower = str(next(tokens))  # type: str
    solve(upper, lower)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S1 = input()
S2 = input()
print('YES' if S1 == S2[::-1] else '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:
a, b = input(), input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

word1 = input()
word2 = input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

word1 = input()
word2 = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
f=input()
e=input()
e=e[::-1]
if f==e:
    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:
u=str(input())
b=str(input())
if u[0]==b[2] and u[1]==b[1] and u[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:
c1 = list(input())
c2 = list(input())

r1 = c1[::-1]
r2 = c2[::-1]

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

Submission status: Accepted

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

u = t[::-1]
v = s[::-1]

print("YES" if s == u and t == v 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:
x = list(str(input()))
y = list(str(input()))
x.reverse()
if x == y :
    print('YES')
else :
    print('NO')

Submission status: Accepted

Solution code:


def main():
    a = [list(input()) for i in range(2)]
    b = [a[1][::-1], a[0][::-1]]

    # print(a, b)

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



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def abc():
    upper = input()
    lower = input()

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


abc()

Submission status: Accepted

Solution code:

up = input()
down = input()

down_re = ""

for i in down:
    down_re = i + down_re
    
if up == down_re:
    print ("YES")
    
else:
    print ("NO")

Submission status: Accepted

Solution code:
x = input() + input()
print('YES' if x == x[::-1] else '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:
def main():
    print('YNEOS'[(input() != input()[::-1])::2])


main()

Submission status: Accepted

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

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:
C = [list(input()), list(input())]
ans = "YES"
for i in range(3):
    if C[0][i] != C[1][2-i]:
        ans = "NO"
        break
print(ans)

Submission status: Accepted

Solution code:

c=input()
d=input()
a=c
b=d
c=c[::-1]
d=d[::-1]
if a==d and b==c:
    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:
c=list(input())
d=list(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:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    C = [ST() for _ in range(2)]
    for i in range(3):
        if C[0][i] != C[1][2 - i]:
            print("NO")
            exit()
    print("YES")
if __name__ == '__main__':
    main()

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

a_rev = ''.join(list(reversed(a)))


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

Submission status: Accepted

Solution code:
S1 = input()
S2 = input()
newS1 = S2[2]+S2[1]+S2[0]
newS2 = S1[2]+S1[1]+S1[0]
if S1 == newS1 and S2 == newS2: print('YES')
else: print('NO')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

else:
    print("NO")

Submission status: Accepted

Solution code:
C = [list(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:
# sys.stdin.readline()
import sys
import math
input = sys.stdin.readline

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
t.reverse()
print("YES" if s == t else "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[::-1] == c2 :
    print("YES")
else :
    print("NO")

Submission status: Accepted

Solution code:
c = [input() for i in range(2)]
a = "".join(list(reversed(c[0])))
if a == c[1]:
    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:
a = input()[::-1]
b = input()
if a == b:
  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 c2[0] == c1[2]:
  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:
import sys
read = lambda: sys.stdin.readline().rstrip()
s1 = read()
s2 = read()
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:

s1 = input()
s2 = input()
flag = True

for i in range(len(s1)):
    if s1[i] != s2[len(s2)-i-1]:
        print('NO')
        flag = False
        break

if flag:
    print('YES')

Submission status: Accepted

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

Submission status: Accepted

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

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:
print("YNEOS"[list(input())!=list(reversed(list(input())))::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s=input()
t=input()
for c in range(3):
    if s[c]!=t[2-c]:
        print("NO")
        sys.exit(0)
print("YES");

Submission status: Accepted

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

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

Submission status: Accepted

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

if C2[::-1] == C1:
    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:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}


a=str(input())
b=str(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:
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[::-1] == c2:
  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())
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())
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())
m = list(input())
if int(l[0]==m[2]) & int(l[1]==m[1]) & int(l[2]==m[0]):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(str(input()))
e = list(str(input()))
if a[0] == e[2] and a[1] == e[1] and a[2] == e[0]:
    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 print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("YES" if "".join(reversed(input()))==input() else "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:
a,b = [input() for i in range(2)]
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:
a1 = input()
a2 = input()
if a1[0] == a2[2] and a1[1] == a2[1] and a1[2] == a2[0] :
	print("YES")
else :
	print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a1 = list(_ for _ in input())
    a2 = list(_ for _ in input())
    if a2[2] == a1[0] and a1[1] == a2[1] and a1[2] == a2[0]:
        print('YES')
    else:
        print('NO')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
listA=list(input())
listB=list(input())
print('YES' if list(reversed(listA)) == listB else 'NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math


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

Submission status: Accepted

Solution code:

def read_input():
    s1 = input()
    s2 = input()
    return s1, s2


def submit():
    s1, s2 = read_input()
    s2 = s2[::-1]

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

if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s1 = input()
    s2 = input()

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

solve()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

s=input()
t=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
b=input()
a1=a[0]
a2=a[1]
a3=a[2]
b1=b[0]
b2=b[1]
b3=b[2]
if a1==b3 and a2==b2 and a3==b1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
y = input()
print("YES" if x==y[::-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()
Aarray=[]
Barray=[]
for i in a:
    Aarray.append(i)
for i in b:
    Barray.append(i)

if Aarray==list(reversed(Barray)):
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Your code here!
a = input()
b = input()

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

Submission status: Accepted

Solution code:
f_floor=input()
s_floor=input()

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

Submission status: Accepted

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

ar=a[::-1]
br=b[::-1]

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

Submission status: Accepted

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

if A[2] == B[0] and A[0] == B[2] and A[1] == 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:
x = str(input())
y = str(input())
if x == y[::-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:
X = str(input())
Y = str(input())

if (X == Y[::-1]):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
l1 = list(input())
l2 = list(input())

L1 = l1[::-1]
L2 = l2[::-1]

if l1 == L2 and l2 == L1:
    print("YES")
else:
    print("NO")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b = [input() for _ in range(2)]

count = 0

for i in range(3):
    if a[i] == b[2-i]:
        count += 1

print('YES' if count == 3 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:
arr = []
for i in range(2):
	arr += list(map(str,input().split()))
	
def reverce(org):
	ls_rev_org = []
	ls_org = list(org)
	for i in range(1,len(org)+1):
		ls_rev_org += ls_org[-i]
	return ''.join(ls_rev_org)

rev_org = reverce(arr[0])

if rev_org == arr[1]:
	print('YES')
else:
	print('NO')

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

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

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
c = []
c.append(input())
c.append(input())
for i in range(2):
    for j in range(3):
        if c[i][j] != c[1-i][2-j]:
            print('NO')
            sys.exit()
print('YES')

Submission status: Accepted

Solution code:
# ABC077A - Rotation
a, b = [input().rstrip() for _ in range(2)]
if a[1] == b[1] and a[0] == b[2] 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:
s=input()
t=input()
print("YES" if s[::-1]==t else "NO")

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:
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, b = list(input()), 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:
c = [input() for i in range(2)]
ans = 'NO'
if c[0][0] == c[1][2] and c[0][1] == c[1][1] and c[0][2] == c[1][0]:
    ans = 'YES'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c11, c12, c13 = list(input())
c21, c22, c23 = list(input())
if c11 == c23 and c12 == c22 and c13 == c21:
    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=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()[::-1]
if a==b:
  print('YES')
else:
  print('NO')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = [input() for _ in [0,0]];print("YNEOS"[s[0][0] != s[1][2] or s[0][1] != s[1][1] or s[0][2] != s[1][0]::2])

Submission status: Accepted

Solution code:
print(["YES", "NO"][not("".join(reversed(input())) == input())])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c_1 = str(input())
c_2 = str(input())
tmp = c_1[2] + c_1[1] + c_1[0]
if tmp == c_2:
  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, b, c=input()
d, e, f=input()
if a==f and b==e and c==d:
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

if a == b[::-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:
import numpy as np
C = np.array([list(input()) for i in range(2)])

C_r = np.array([['0']*3 for i in range(2)])
for i in range(2):
    for j in range(3):
        C_r[1-i, 2-j] = C[i, j]

if np.all(C==C_r):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
#077 A
C1 =input()
C2= input()
if C1[::-1] ==C2:
    print('YES')
else:
    print('NO')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c = list(input())

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

C1a = C1[2]+C1[1]+C1[0]
C2a = C2[2]+C2[1]+C2[0]

if C1 == C2a and C2 == C1a:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from sys import exit
# A,B,C = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
S = str(input())
S1 = str(input())[::-1]
if (S == S1):
    print("YES")
else: 
    print("NO")

Submission status: Accepted

Solution code:
s = list(input())
t = list(input())
t.reverse()
if s == t:
    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() for _ in range(2)]
ans='NO'
if c[0][0]==c[1][2]:
    if c[0][1]==c[1][1]:
        if c[0][2]==c[1][0]:
            ans='YES'
print(ans)

Submission status: Accepted

Solution code:
def solve(string):
    c = string.split()
    return "YES" if c[0] == c[1][::-1] else "NO"


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=[]
b=[]
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 == 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')