s=eval(input());print(('YNeos'[s!=s[::-1]::2]))
a,b,c=eval(input());print(('YNeos'[a!=c::2]))
s = eval(input())
print(("YNeos"[s != s[::-1] :: 2]))

a, b, c = eval(input())
print(("YNeos"[a != c :: 2]))

-s = eval(input()) -print(("YNeos"[s != s[::-1] :: 2])) +a, b, c = eval(input()) +print(("YNeos"[a != c :: 2]))