c1=eval(input())

c2=eval(input())



if c1==c2[::-1] and c2==c1[::-1]:

  print('YES')

else:

  print('NO')
c1=eval(input())

c2=eval(input())



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

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

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