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.
l = list(map(str,input()))
m = list(map(str,input()))
if l[0]==m[2] and l[1]==m[1] and l[2]and m[0] :
    print('Yes')
else:
    print('No')

l = list(map(str,input()))
m = list(map(str,input()))
if l[0]==m[2] and l[1]==m[1] and l[2]== m[0] :
    print('YES')
else:
    print('NO')
