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.
c1 = list(input())
c2 = list(input())

print('Yes') if (list(reversed(c1)) == c2 and list(reversed(c2)) == c1) else print('No')

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

print('YES') if (list(reversed(c1)) == c2 and list(reversed(c2)) == c1) else print('NO')
