n1, n2, n3 = eval(input())

print(('Yes' if n1 == n3 else 'No'))

N = eval(input())

if N[0] == N[2]:

  print('Yes')

else:

  print('No')

n1, n2, n3 = eval(input())
print(("Yes" if n1 == n3 else "No"))

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

-n1, n2, n3 = eval(input()) -print(("Yes" if n1 == n3 else "No")) +N = eval(input()) +if N[0] == N[2]: +    print("Yes") +else: +    print("No")