s = eval(input())



if s != s[::-1]:

  print("No")

  exit()

if s[:(len(s)-1)//2] != s[:(len(s)-1)//2][::-1]:

  print("No")

  exit()

if s[(len(s)+3)//2-1:] != s[(len(s)+3)//2-1:][::-1]:

  print("No")

  exit()

  

print("Yes")
s = eval(input())



if s != s[::-1]:

  print("No")

  exit()

  

x = s[:((len(s)-1)//2)]

if x != x[::-1]:

  print("No")

  exit()

  

y = s[((len(s)+3)//2-1):]

if y != y[::-1]:

  print("No")

  exit()



print("Yes")
s = eval(input())
if s != s[::-1]:
    print("No")
    exit()
if s[: (len(s) - 1) // 2] != s[: (len(s) - 1) // 2][::-1]:
    print("No")
    exit()
if s[(len(s) + 3) // 2 - 1 :] != s[(len(s) + 3) // 2 - 1 :][::-1]:
    print("No")
    exit()
print("Yes")

s = eval(input())
if s != s[::-1]:
    print("No")
    exit()
x = s[: ((len(s) - 1) // 2)]
if x != x[::-1]:
    print("No")
    exit()
y = s[((len(s) + 3) // 2 - 1) :]
if y != y[::-1]:
    print("No")
    exit()
print("Yes")

-if s[: (len(s) - 1) // 2] != s[: (len(s) - 1) // 2][::-1]: +x = s[: ((len(s) - 1) // 2)] +if x != x[::-1]: -if s[(len(s) + 3) // 2 - 1 :] != s[(len(s) + 3) // 2 - 1 :][::-1]: +y = s[((len(s) + 3) // 2 - 1) :] +if y != y[::-1]: