N = eval(input())

revN = N[::-1]



if int(N) == int(revN):

    print("Yes")

else:

    print("No")
N = eval(input())



if N[0] == N[-1]:

    print("Yes")

else:

    print("No")
N = eval(input())
revN = N[::-1]
if int(N) == int(revN):
    print("Yes")
else:
    print("No")

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

-revN = N[::-1] -if int(N) == int(revN): +if N[0] == N[-1]: