a,b,c = eval(input())

print(('Yes' if a == c else 'No'))
a = eval(input())

print(('Yes' if a[0] == a[2] else 'No'))
a, b, c = eval(input())
print(("Yes" if a == c else "No"))

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

-a, b, c = eval(input()) -print(("Yes" if a == c else "No")) +a = eval(input()) +print(("Yes" if a[0] == a[2] else "No"))