a=eval(input())

b=eval(input())

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

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

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