c1 = eval(input())

c2 = eval(input())



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

  print("YES")

else:

  print("NO")
c = eval(input())

d = input()[::-1]



if c == d:

    print("YES")

else:

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

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

-c1 = eval(input()) -c2 = eval(input()) -if c1[::-1] == c2: +c = eval(input()) +d = input()[::-1] +if c == d: