a=eval(input())

print(('YNeos'[1-(a==a[::-1])::2]))
n=eval(input())

print(('Yes' if n[0]==n[2] else 'No'))
a = eval(input())
print(("YNeos"[1 - (a == a[::-1]) :: 2]))

n = eval(input())
print(("Yes" if n[0] == n[2] else "No"))

-a = eval(input()) -print(("YNeos"[1 - (a == a[::-1]) :: 2])) +n = eval(input()) +print(("Yes" if n[0] == n[2] else "No"))