s1 = list(eval(input()))

s2 = list(eval(input()))



if s1 == s2[::-1]:

    print("YES")

else:

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

c2 = eval(input())



if c1[0] == c2[-1] and c1[1] == c2[-2] and c1[2] == c2[-3]:

    print("YES")

else:

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

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

-s1 = list(eval(input())) -s2 = list(eval(input())) -if s1 == s2[::-1]: +c1 = eval(input()) +c2 = eval(input()) +if c1[0] == c2[-1] and c1[1] == c2[-2] and c1[2] == c2[-3]: