#ABC070A

a = eval(input())

print(("Yes" if (a[-1] == a[0]) else "No"))
#ABC070

#文字列の逆順

n = eval(input())

print(("Yes" if n==n[::-1] else "No"))
# ABC070A
a = eval(input())
print(("Yes" if (a[-1] == a[0]) else "No"))

# ABC070
# 文字列の逆順
n = eval(input())
print(("Yes" if n == n[::-1] else "No"))

-# ABC070A -a = eval(input()) -print(("Yes" if (a[-1] == a[0]) else "No")) +# ABC070 +# 文字列の逆順 +n = eval(input()) +print(("Yes" if n == n[::-1] else "No"))