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 = input()
R1 = C1[::-1]
C2 = input()
R2 = C2[::-1]
print(['No','Yes'][R2==C1 and R1==C2])
print(['NO','YES'][input()==input()[::-1]])