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

print((["NO", "YES"][eval(input()) == input()[::-1]]))

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