peterverebics/CodeNet_Python_118 huggingface dataset:
S = input()
def kaibun(S):
  for i in range(len(S)//2):
    if S[i] != S[-i-1]:
      return False
      break
  else:
    return True

if kaibun(S) and kaibun(S[:len(S)//2]) and kaibun(S[(len(S)+3)//2-1:]):
  print ("Yes")
else:
  print ("No")
s=input()
n=len(s)
n_1=int((n-1)/2)
n_2=int((n+1)/2)

s_1=s[:n_1]
s_2=s[n_2:]

if s==s[::-1] and s_1==s_1[::-1] and s_2==s_2[::-1]:
    print("Yes")
else:
    print("No")
s= input()

s_r = s[::-1]
N = len(s)
s_2 = s[:int((N-1)/2)]
s_3 = s[int((N+1)/2):]

if ( (s == s_r) & (s_2 ==s_2[::-1]) &(s_3 ==s_3[::-1])):
  print('Yes')
else :
  print('No')
s = input()
ans = "Yes"
for i in range(len(s)//2):
  if s[i]!=s[-1-i]:
    ans = "No"
    break
for i in range(len(s)//2//2):
  if s[i]!=s[len(s)//2-1-i]:
    ans = "No"
    break
print(ans)
def isPalin(s):
    return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]
#print(a,b)
if isPalin(a) and isPalin(b) and len(s)%2!=0 and isPalin(s):
    print("Yes")
else:
    print("No")
s=list(input())
cnt=0
for i in range(len(s)//2):
    if s[i]!=s[len(s)-1-i]:
        print("No")
        exit()
    else:
        continue
for i in range((len(s)//2)//2+1):
    if (s[i]!=s[len(s)//2-i-1]) and (s[-(-len(s)//2)+1]!=s[len(s)-1-i]):
        print("No")
        exit()
    else:
        continue
print("Yes")
s = input()

n = len(s)
half = int((n-1)/2)
half_s = s[:half]
half_list = list(half_s)
for i in range(half):
    if half_list[i] != half_list[half-i-1]:
        print("No")
        exit()
if half_s != s[half+1:]:
    print("No")
    exit()
print("Yes")
S=list(input())
N=len(S)
#print(S, N)
s1=S[(N-1)//2]
s3=S[(N+3)//2-1:]

if S==S[::-1] and s1==s1[::-1] and s3==s3[::-1]:
  print("Yes")
else:
  print("No")
def k(string): return True if string==string[::-1] else False
s = input()
n = len(s)
if k(s) and k(s[:int((n-1)/2)]) and k(s[int((n+3)/2)-1:]):
  print("Yes")
else:
  print("No")
s = list(input())
n = len(s)
ans = "No"

if n == 3:
    if s[0] == s[2]:
        print("Yes")
        exit()
    else:
        print("No")
        exit()


for i in range(1 - -(n//2)//2):
    if s[i] == s[n//2 - i - 1] == s[n//2 + i + 1] == s[n - i - 1]:
        ans = "Yes"
    else:
        print("No")
        exit()

print(ans)
s = input()
s1 = s[::-1]
if s == s1:
    s2 = s[:(len(s) - 1) // 2]
    s3 =s2[::-1]
    if s2 == s3:
        s4 = s[(len(s) + 1) // 2:]
        s5 = s4[::-1]
        if s4 == s5:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
# -*- coding: utf-8 -*-
S = input()
N = len(S)

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

con1 = is_kaibun(S)
con2 = is_kaibun(S[0:int((N-1)/2)])
con3 = is_kaibun(S[int((N + 3) / 2)-1:])
# print(S, S[0:int((N-1)/2)-1], S[int((N + 3) / 2):])
# print(con1, con2, con3)
if (con1 and con2 and con3):
    print('Yes')
else:
    print('No')
S=input()

N=len(S)


if S[:(N-1)//2]==S[(N+3)//2-1:]:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)
if s == s[::-1] and s[:(n-1)//2] == s[:(n-1)//2][::-1] and s[((n+3)//2-1):] == s[((n+3)//2-1):][::-1]:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
s = S[:(N-1)//2]
t = S[(N+3)//2-1:]
 
if s == t[::-1] and s == s[::-1] and t == t[::-1]:
  ans = "Yes"
else:
  ans = "No"
  
print(ans)
s=input()
#s="akasaka"

def kaibun(x):
    ans=1
    for i in range(len(x)//2):
        if x[i]!=x[-i-1]:
            ans=0
            break
    return ans
n=len(s)
a1=kaibun(s)
a2=kaibun(s[0:(n-1)//2])
a3=kaibun(s[-1+(n+3)//2:n])

if a1==1 and a2==1 and a3==1:
    print("Yes")
else:
    print("No")
import math
import sys
s = input()
n = int(len(s))

if s[0:math.floor(n/2)] != s[math.ceil(n/2):]:
  print('No')
  sys.exit()

j = int((n-1)/2)-1
for i in range(int((n-1)/2)):
  if s[i] != s[j]:
    print('No')
    sys.exit()
  j -= 1

print('Yes')
s=input()
n=len(s)
m=n//2
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True
if is_kaibun(s[:m]) and is_kaibun(s[m+1:]) and s[:m]==s[m+1:]:
  print("Yes")
else:
  print("No")
def is_p(s):
    return s == s[::-1]
s = input()
l = (len(s) - 1)//2
r = l + 1
print('Yes' if is_p(s) and is_p(s[:l]) and is_p(s[r:]) else 'No')
s = input()
if s == s[::-1]:
    flag = True
else:
    flag = False
N = len(s)
if flag:
    new = s[0:int((N-1)/2)]
    if new == new[::-1]:
        flag = True
    else: flag = False

if flag:
    new = s[int((N+2)/2):N]
    if new == new[::-1]:
        flag = True
    else:
        flag = False

if flag:
    print("Yes")
else:
    print("No")
s = input()

cnt = 0
for i in range(0,len(s)):
    if s[i] != s[len(s)-1-i]: cnt += 1
    else: pass

test2 = int((len(s)-1)/2)
for i in range(0,test2):
    if s[i] != s[test2-1-i]: cnt += 1
    else: pass
    
test3 = int((len(s)+3)/2-1)
for i in range(test3,len(s)):
    if s[i] != s[len(s)-1-i]: cnt += 1
    else: pass
    
if cnt != 0: 
    print('No')
else:
    print('Yes')
s=str(input())
def judge(s):
  l=len(s)
  if l%2==1:
    for i in range((l-1)//2):
      if s[i]==s[-i-1]:
        pass
      else:
        return 0
    return 1
  else:
    for i in range(l//2):
      if s[i]==s[-i-1]:
        pass
      else:
        return 0
    return 1
L=len(s)
if judge(s)==1 and judge(s[0:(L-1)//2])==1 and judge(s[(L+3)//2-1:])==1:
  print('Yes')
else:
  print('No')
s = input()
n = len(s)
a = int((n-1)/2)
aa = s[:a]
b = int((n+3)/2-1)
bb = s[b:]

if s == s[::-1] and aa == aa[::-1] and bb == bb[::-1]:
  print("Yes")
else:
  print("No")
S = input()
l = len(S)
fl = (l-1)//2
sl = (l+3)//2 - 1
f = S[:fl]
s = S[sl:]
if f == f[::-1] and s == s[::-1] and S == S[::-1]:
    print('Yes')
else:
    print('No')
s = input()
l = len(s)
flag = False
for i in range(l//2):
    if s[i] != s[-(i+1)]:
        flag = True
for i in range(int((l-1)/2)):
    if s[i] != s[int((l-1)/2)-i+1] and s[int((l+3)/2)+i-1] != s[-(i+1)]:
        flag = True
print('No' if flag else 'Yes')
s = input()
n = len(s)
def f(a):
  return a == a[::-1]

if f(s) and f(s[:(n-1)//2]) and f(s[(n+3)//2-1:]):
  print("Yes")
else:
  print("No")
s = input("")
l = len(s)
s1 = s[:int((l-1)/2)]
s2 = s[int((l+3)/2) - 1:]
if (s1 == s1[::-1]) and (s2 == s2[::-1]) and (s == s[::-1]):
    print("Yes")
else :
    print("No")
S = input()
N = len(S)


subS1 = S[:int((N - 1) / 2)]
subS2 = S[int((N + 3) / 2) - 1:]

if subS1 == subS1[::-1] and subS2 == subS2[::-1] and S == S[::-1]:
    print("Yes")
else:
    print("No")
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if S1==S2 and S1==S1[::-1]:
    print("Yes")
else:
    print("No")
s = input()
a = s[::-1]
n = len(s)
ans = "Yes"
if s != a: ans = "No"
elif s[:(n-1)//2] != s[(n+3)//2-1:]: ans = "No"
print(ans)
s=input()
n=len(s)//2
print("No"if s!=s[::-1]or s[:n]!=s[-n:]else"Yes")
s=input()

n=len(s)

a=s[::-1]

mae=(a[0:int((n-1)/2)])

maer=(mae[::-1])

ato=(a[int((n+2)/2):])

ator=(ato[::-1])

if a==s :
    if mae==maer and ato==ator:
        print("Yes")
    else :
        print("No")
        

else :
    print('No')
S = input()
L = len(S)
if(S[::-1]==S and S[:(L-1)//2:]==S[(L-1)//2-1::-1] and S[L-1:(L+3)//2-2:-1]==S[(L+3)//2-1::]):
    print("Yes")
else:
    print("No")
s=input();n=len(s)//2;print('YNeos'[s[:n]!=s[-n:]::2])
S = input()
N = len(S)

ans = "Yes"

for x in range(N // 2):
    if S[x] != S[N-x-1]:
        ans = "No"

for x in range(0, (N-1)//2):
    if S[x] != S[(N-1)//2 - 1 - x]:
        ans = "No"

for x in range(0, (N-1)//2):
    if S[(N-1)//2 + 1 + x] != S[N-1-x]:
        ans = "No"

print(ans)
S = input()
left = S[:int((len(S) - 1) / 2)]
right = S[int((len(S) + 1) / 2):]

if (S == S[::-1] and left == left[::-1] and right == right[::-1]):
  print('Yes')
else:
  print('No')
ss = input()
if ss != ss[::-1]:
    print('No')
    exit(0)

ss_f = ss[:int(len(ss) / 2)]
if ss_f != ss_f[::-1]:
    print('No')
    exit(0)

print('Yes')
import copy
s=input()

if s[:len(s)//2]==s[1+len(s)//2:]:
    fi=list(s[:len(s)//2])
    fis = copy.copy(fi)
    fis.reverse()
    se=list(s[1+len(s)//2:])
    ses = copy.copy(se)
    ses.reverse()
    if fi==fis and se==ses:
            print('Yes')
    else:
        print('No')
else:
    print('No')
def palindrome(string): return 0 if string==string[::-1] else 1
stri = input()
s = list(stri)
a = len(s)//2
b = s[0:a]
c = s[a+1:]
d = palindrome(b)
e = palindrome(c)
f = palindrome(s)
if d==0 and e==0 and f==0:
    print('Yes')
else:
    print('No')
def solve():
	s=input()
	if(len(s)%2==0):
		print("No")
		return 
	else :
		n=len(s)//2
		str1=s[:n]
		str2=s[n+1:]
		# print(str1,str2)
		if(str1==str2):
			print("Yes")
		else:
			print("No")
if __name__ == "__main__":
	solve()
S = input()
N = len(S)
if S != S[::-1]:
    print('No')
    exit()

X = S[:N // 2]
if X != X[::-1]:
    print('No')
    exit()

X = S[N // 2 + 1:]
if X != X[::-1]:
    print('No')
    exit()

print('Yes')
s = input()
n = len(s)

def palindrome(i):
    if i == i[::-1]:
        return True

s_1 = s[:int((n-2)/2+1)]
s_2 = s[int((n+2)/2):]

if palindrome(s) and palindrome(s_1) and palindrome(s_2):
    print("Yes")
else:
    print("No")
def solve(s):
  s = list(s)
  n = len(s)
  ans = check_palindrome(s) & check_palindrome(s[:int(((n-1)//2))]) & check_palindrome(s[int(((n+3)//2)-1):])
  return "Yes" if ans else "No"


def check_palindrome(st):
  a = list(st)
  b = list(reversed(st))
  return a == b




s = str(input())
# n, m = [int(s) for s in input().split(" ")]
print(solve(s))
s = input()
n = len(s)
if s == s[::-1]:
    if s[:(n-1)//2] == s[(n+3)//2-3::-1] and s[(n+3)//2-1:] == s[:(n-1)//2:-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
S = str(input())
N = int(len(S))
B = S[:(N-1)//2]
C = S[(((N+3)//2)-1):]

if S == S[::-1]:
    if B == B[::-1]:
        if C[::-1] == C:
            print("Yes")
        else:
            print("No")
    else:
            print("No")
else:
            print("No")
import numpy as np

S = np.array([i for i in input()])
S_rev = S[::-1]
N = len(S)

ans = 'No'

if all(S == S_rev):
  temp_S = S[:(N-1)//2]
  temp_S_rev = temp_S[::-1]
  
  if all(temp_S == temp_S_rev):
    temp_S = S[(N+3)//2-1:]
    temp_S_rev = temp_S[::-1]
    
    if all(temp_S == temp_S_rev):
      ans = 'Yes'
print(ans)
# -*- coding: utf-8 -*-
from sys import stdin
from operator import itemgetter
# stdin = open("sample.txt")

s = stdin.readline().rstrip()
t = s[0:(len(s)-1)//2]
u = s[(len(s)+3)//2 - 1:len(s)]

if t == u and t == t[::-1]:
    print("Yes")
else:
    print("No")
S = input()
BUN = list(S)
N = 0
for a in BUN:
    N += 1
X = N //2
if BUN[0:X] == BUN[X+1:N+1]:
    print("Yes")
else:
    print("No")
s = list(input())
l = len(s)

flag = 0
if s == s[::-1]:
  flag += 1
ss = s[0:l//2]
if ss == ss[::-1]:
  flag += 1
  
if flag == 2:
  print("Yes")
else:
  print("No")
s = input()

def check():
  if s != s[::-1]:
    return("No")
  n = len(s)
  s1 = s[:int((n-1)/2)]
  #print(s1)
  if s1 != s1[::-1]:
    return("No")
  s2 = s[int((n+3)/2-1):]
  if s2 != s2[::-1]:
    return("No")
  #print(s2)
  return("Yes")

print(check())
s = input()
n = len(s)
r = 'Yes'
for i in range(len(s)//2):
    if not s[i]==s[len(s)-1-i]:
        r = 'No'
        break
s_ = s[:(n-1)//2]
for i in range(len(s_)//2):
    if not s_[i]==s_[len(s_)-1-i]:
        r = 'No'
        break
s_ = s[(n+3)//2-1:]
for i in range(len(s_)//2):
    if not s_[i]==s_[len(s_)-1-i]:
        r = 'No'
        break
print(r)
s=input()
n=len(s)
flag=0

kai1=s[0:(n-1)//2]
kai2=s[((n+3)//2)-1::]
#print(s)
#print(kai1)
#print(kai2)
if (s==s[::-1] and kai1==kai1[::-1] and kai2==kai2[::-1]):
    print("Yes")
else:
    print("No")
S = input()
if S[:int((len(S)-1)/2)] == S[int((len(S)+3)/2)-1:]:
    print("Yes")
else:
    print("No")
S=input()
N=len(S)

J=S[:int((N-1)/2)]
K=S[int((N+3)/2)-1:]

S_R=''.join(list(reversed(S)))
J_R=''.join(list(reversed(J)))
K_R=''.join(list(reversed(K)))

if (S==S_R)and(J==J_R)and(K==K_R):
    print("Yes")
else:
    print("No")
s = input()
cnt = len(s)//2
ans = "Yes"

for i in range(cnt):
    if s[i] != s[-(i+1)]:
        ans = "No"
        break

    if s[i] != s[i + cnt + 1]:
        ans = "No"
        break
        
print(ans)
s = input()
half = len(s)//2
first_s = s[:half]
if first_s == first_s[::-1] and first_s == s[half+1:]:
    print("Yes")
else:
    print("No")
s = [i for i in input()]
len_s = len(s)

def reverse(s):
  rev = [j for j in s[::-1]]
  return rev

if s == reverse(s):
  if reverse(s[:(len_s - 1)//2]) == s[:(len_s - 1)//2] and reverse(s[(len_s + 3)//2 - 1:]) == s[(len_s + 3)//2 - 1:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")
def f(x):
	return x == x[::-1]
S = input()
l = (len(S)-1)//2
S1 = S[:l]
S2 = S[l+1:]
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")
s = list(input())
n = (len(s) - 1) // 2

if s == s[::-1]:
    x = s[:n]
    if x == x[::-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")
S = input()
N = len(S)

def check(S1):
    if S1 != S1[::-1]:
        return False
    else:
        return True

POS = int((N-1)/2)
S1 = S[0:POS]
POS = int((N+3)/2)
S2 = S[POS-1:N]

if check(S) == False or check(S1) == False or check(S2) == False:
    print('No')
else:
    print('Yes')
#!/usr/bin/env python3
def main():
    S = input()

    N = len(S)
    if S[:(N - 1) // 2] == S[(N + 3) // 2 - 1:]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
s=input().strip()
n=len(s)
ans="No"

if s==s[::-1]:
  if s[:(n-1)//2]==s[(n-1)//2-1::-1] and s[(n+3)//2-1:]==s[:(n+3)//2-2:-1]:
    ans="Yes"
print(ans)
s = input()
n = len(s)
a = s[:((n-1)//2)]
if a == a[::-1] and s == s[::-1]:
  print('Yes')
else:
  print('No')
S = input()
N = len(S)

r_S = S[::-1]

head_S = S[0: int((N - 1) / 2)]
r_head_S = head_S[::-1]

end_S = S[int((N+3)/2 - 1) : N+1]
r_end_S = end_S[::-1]

if S == r_S and head_S == r_head_S and end_S == r_end_S:
    print("Yes")
else:
    print("No")
import sys
S = input()
N = len(S)
M = int((N-1)/2)
L = int((N+3)/2)
for i in range(M):
    if(S[i] != S[-i-1]):
        print('No')
        sys.exit()
for j in range(1,M,1):
    if(S[j] != S[M-1-j]):
        print('No')
        sys.exit()
for k in range(L,N,1):
    if(S[k-1] != S[-1-(k-L)]):
        print('No')
        sys.exit()
print('Yes')
s=input()

def func(ass):
    for i in range(len(ass)//2):
        if ass[i] != ass[-(i+1)]:
            print('No')
            exit()

func(s)
func(s[:len(s)//2])
func(s[len(s)//2+len(s)%2:])

print('Yes')
S=input()
if S == S[::-1] and S[:int((len(S)-1)/2):] == S[:int((len(S)-1)/2):-1] and S[int((len(S)+1)/2)::]==S[len(S):int((len(S)-1)/2):-1]:
    print("Yes")
else:
    print("No")
def ok():
    print("Yes")
    return

def ng():
    print("No")
    exit()
    return


s=input()
n=len(s)
if s!=s[::-1]:ng()
s1=s[:n//2]
if s1!=s1[::-1]:ng()

ok()

#otamesi
s = input()
n = len(s)
sf = s[0:(n-1)//2]
sl = s[(n+1)//2:]
for i in range(n//2):
    if s[i] != s[-i-1]:
        print('No')
        exit()
n2 = len(sf)
for i in range(n2//2):
    if sf[i] != sf[-i-1] or sl[i] != sl[-i-1]:
        print('No')
        exit()
print('Yes')
S = input()
N = (len(S)-1)//2
M = (len(S)+3)//2
count = 0

if S[::-1] == S:
  if S[:N] == S[:N][::-1]:
    if S[(M-1):] == S[(M-1):][::-1]:
      count += 1
print("Yes" if count == 1 else "No")
s=input()
n=len(s)
s1=s[:n//2]
s2=s[n//2+1:]
test =True
if(s!=s[::-1]):
	test=False
if (s1!=s1[::-1]):
	test=False
if(s2!=s2[::-1]):
	test=False
if(test==True):
	print("Yes")
else:
	print("No")
s = input()
n = len(s)
ss = s[0:int((n-1)/2)]
st = s[int((n+3)/2)-1:]
if s == s[::-1] and ss == ss[::-1] and st == st[::-1]:
  print('Yes')
else:
  print('No')
s = input()
N = len(s)
flag = 0
i = int((N-1)/2)
if s[0:i] == s[i+1:N]:
    flag = 1;
b = ""
for j in range(i):
    b += s[i-j-1]
if b == s[0:i]:
    flag += 1

if flag == 2:
    print("Yes")
else:
    print("No")
S = input()

halfLength = len(S) // 2
mae = S[:halfLength] 
ushiro = ''.join(list(reversed(S[halfLength+ 1:])))
answer = 'No'
if mae == ushiro:
    mae_halflen =  len(mae) // 2
    mae_mae = mae[mae_halflen:] 
    mae_ushiro = ''.join(list(reversed(mae[:mae_halflen + len(mae) % 2])))
    if (mae_mae == mae_ushiro):
         answer = 'Yes'
print(answer)
s = input()

def is_palindrome(a):
    n = len(a)
    i = 0
    while 2 * i < n:
        if s[i] != s[n - i - 1]:
            return False
        i += 1
    return True

if is_palindrome(s):
    n = len(s)
    fr = s[: (n - 1)//2]
    sc = s[(n + 1) // 2:]
    if is_palindrome(fr) and is_palindrome(sc):
        print('Yes')
    else:
        print('No')
else:
    print('No')
s = input()
n = len(s)
s_1 = s[:(n-1)//2]
s_2 = s[(n+3)//2 - 1:]
if s == s[::-1] and s_1 == s_1[::-1] and s_2 == s_2[::-1]:
    print('Yes')
else:
    print('No')
def is_kaibun(s):
    if (s == s[::-1]):
        return True
    else:
        return False


def b():
    S = str(input())
    N = len(S)
    k1 = is_kaibun(S)
    k2 = is_kaibun(S[:int((N-1)/2)])
    k3 = is_kaibun(S[int((N+1)/2):])

    if (k1 and k2 and k3):
        print('Yes')
    else:
        print('No')


##########
if __name__ == "__main__":
    b()
s = input()
l = len(s)

f = 'Yes'
for i in range(int((l-1)/2)):
    if s[i] != s[l-i-1]:
        f = 'No'
for i in range(int(((l-1)/2)//2)):
    if s[i] != s[l-i-int((l-1)/2+1)-1]:
        f = 'No'




print(f)
S = input()
ans = False
a = S[:(len(S) - 1) // 2]
b = S[(len(S) + 3) // 2 - 1:]
if S == S[::-1] and a == a[::-1] and b == b[::-1]:
    ans = True
print('Yes' if ans else 'No')
S=str(input())
N=len(S)
M=int((N-1)/2)
sum=0
for i in range(N):
    if S[i]==S[-1-i]:
        sum += 1
for i in range(M):
    if S[i]==S[M-i-1]:
        sum += 1
for i in range(M+1,N):
    if S[i]==S[M-i]:
        sum += 1
if sum==2*N-1:
    print("Yes")
else:
    print("No")
s = input()
n = len(s)
s1 = s[0:(n - 1) // 2]
s2 = s[(n + 3) // 2 - 1:]
if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')
s=input()
n=len(s)
t=s[:(n-1)//2]
u=s[(n+3)//2-1:]
if s==s[::-1] and t==t[::-1] and u==u[::-1]:
  print('Yes')
else:
  print('No')
s=input()
for i in range((len(s)-1)//2):
    if s[i]!=s[-i-(len(s)//2)-2]:
        print('No')
        exit()
if s[0:len(s)//2]!=s[len(s)//2+1:-1]+s[-1]:
    print('No')
    exit()
print('Yes')
# -*- coding: utf-8 -*-


def is_kaibun(s):
    return s == s[::-1]


def main():
    s = input()
    i = len(s)

    check_1 = s[:int((i - 1) / 2)]
    check_2 = s[int(((i - 1) / 2) + 1):]
    if is_kaibun(s) and is_kaibun(check_1) and is_kaibun(check_2):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
S=input()
s=len(S)
a=''
b=''
for i in range(0,(s-1)//2):
    a+=S[i]
for n in range((s+3)//2-1,s):
    b+=S[n]
if a==b:
    A=a[::-1]
    B=b[::-1]
    if A==a and B==b:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s = input()
n = len(s)
flg = True
if s == s[::-1]:
    if s[:(n-1) // 2] == s[:(n-1) // 2][::-1]:
        if s[(n+3) //2 - 1:] == s[(n+3) //2 - 1:][::-1]:
            flg = False
            print("Yes")
if flg:
    print("No")
S = input()
N = len(S)
ans = 0

if S == S[::-1]:
    ans += 1

i = (N-1) // 2
if S[:i] == S[:i:-1]:
    ans += 1

j = (N+3) // 2 - 1
if S[j:] == S[N:j-1:-1]:
    ans += 1

if ans == 3:
    print('Yes')
else:
    print('No')
S=(input())
 
N = len(S)
 
one = S[0:((N-1)//2)]
two = S[(N+3)//2-1:N]
 
def check_kai(text):
    left = len(text)//2
    
    for i in range(left):
 
        if text[i] != text[len(text)-1-i]:
            print('No')
            exit(0)
 
check_kai(S)
check_kai(one)
check_kai(two)
print('Yes')
s=input()
n=len(s)
a=int(n)
b=int((n-1)/2)
c=int((n+3)/2)

for i in range (a//2):
  if s[i]!=s[a-1-i]:
    print ('No')
    exit()
    
for j in range (b//2):
  if s[i]!=s[b-1-i]:
    print('No')
    exit()
    
for k in range (c-1,a//2):
  if s[i]!=s[c-1-i]:
    print('No')
    exit()
    
print('Yes')
# 入力
s = input()

# 処理
leftLen = len(s) // 2 # 文字列の長さの半分
left = s[:leftLen] # sの左半分

# leftの回文チェック
leftReverse = left[::-1]
isPalindromeLeft = left == leftReverse;

# 全体の回文チェック
right = s[leftLen * -1:] # sの右半分
isPalindrome = isPalindromeLeft and (left == right)

# 結果
result = "Yes" if isPalindrome else "No"

# 出力
print(result)
s = input()

flag = s == s[::-1]
n = len(s)
cond2 = s[:(n-1)//2]
flag &= cond2 == cond2[::-1]
cond3 = s[(n+3)//2-1:]
flag &= cond3 == cond3[::-1]

if flag:
    print("Yes")
else:
    print("No")
S = input()
N = int(len(S))
S2 = S[:(N-1)//2]
if S == S[::-1]:
    if S2 == S2[::-1]:
        print("Yes")
    else:
        print("No")
    
else:
    print("No")
S = input()
N = len(S)
a = S[:N // 2]
b = S[N // 2 + 1:]
print('Yes' if a == a[::-1] == b == b[::-1] else 'No')
S=input()
a=len(S)
b=S[:int((a-1)//2)]
c=b[::-1]
d=S[int((a+3)//2)-1:]
e=d[::-1]
f=S[::-1]
if b==c and d==e and S==f:
  print('Yes')
else:
  print('No')
def kaibun(s):
  for n in range(len(s)//2):
    if s[n] == s[len(s)-n-1]:
      continue
    else:
      return False
  return True

s = input()
#print(s[:(len(s)-1)//2])
#print(s[(len(s)+3)//2-1:])
if kaibun(s) and kaibun(s[:(len(s)-1)//2]) and kaibun(s[(len(s)+3)//2-1:]):
  print('Yes')
else:
  print('No')
def rev(s1):
	i = 0
	j = len(s1) - 1
	while i < j:
		if s1[i] != s1[j]:
			return 0
		i+=1
		j-=1
	return 1

s = list(input())
n = len(s)
if rev(s) and rev(s[:(n-1)//2]) and rev(s[(n+3)//2-1:]):
	print('Yes')
else:
	print('No')
def resolve():
    s = input()
    rs = s[::-1]
    if rs != s:
        print("No")
        exit()
    
    if len(s) == 3:
        print("Yes")
        exit()
    s1 = s[:((len(s)-1)//2)]
    s2 = s[((len(s)+3)//2)-1:]
    rs1 = s1[::-1]
    rs2 =s2[::-1]
    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
resolve()
s = input()
n = len(s)
s1 = s[:(n - 1) // 2]
s2 = s[(n + 2) // 2:]
print("Yes" if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1] else "No")
S = list(input())
N = len(S)
if N%4 == 3 or N%4 == 1:
    if S[0:int((N-1)/2)] == S[int((N+1)/2):N]:
        flag = True
        s = S[0:int((N-1)/2)]
        for i in range(N//4):
            if s[i] != s[-i-1]:
                flag=False
        if flag:
            print('Yes')
        else:
            print('No')
    else:
        print('No')    
else:
    print('No')
s = input()
n = len(s)

sr = s[::-1]

s2 = s[:int((n-1)/2)]
#print(s2)
s2r = s2[::-1]

s3 = s[int((n+3)/2)-1:n]
#print(s3)
s3r = s3[::-1]

if (s == sr) and (s2 == s2r) and (s3 == s3r):
  print('Yes')
else:
  print('No')
def check_kaibun(s):
    if s == s[::-1]:
        return True
    else:
        return False


S = input()
idx = len(S) // 2
if check_kaibun(S) and check_kaibun(S[:idx]) and check_kaibun(S[idx + 1 :]):
    print("Yes")
else:
    print("No")
str = input()
rev_str = str[::-1]
len_str = len(str)

pre_str = str[0:((len_str-1)//2)]
pro_str = str[(((len_str+3)//2)-1)::]

#print(pre_str)
#print(pro_str)


rev_pre_str = pre_str[::-1]
rev_pro_str = pro_str[::-1]

pali = 0

if str == rev_str:
    if pre_str == rev_pre_str:
        if pro_str == rev_pro_str:
            pali = 1

if pali == 1:
    print("Yes")
else:
    print("No")
s=input()
n=len(s)

s_rev=s[::-1]

s_former=s[:(n-1)//2]
s_former_rev=s_former[::-1]

s_latter=s[(n+3)//2-1:]
s_latter_rev=s_latter[::-1]

if (s==s_rev) & (s_former==s_former_rev) & (s_latter==s_latter_rev):
  print('Yes')
else:
  print('No')
a=input()
#b=reversed(a)
c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
d=a[int((len(a)+3)/2)-1:]
 
if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")
# A = [list(map(int, input().split())) for _ in range(3)]
# k = int(input())
# B = [int(input()) for _ in range(n)]
# X = list(map(int, input().split()))
# a, b = map(int, input().split())
S = input()
n = len(S)
judge = True
if S != S[::-1]:
    judge = False
for i, j in zip(S[:n//2], S[n//2+1:]):
    if i != j:
        judge = False
print("Yes") if judge else print("No")
s = input()

for i in range((len(s)-1)//2):
  if s[i] != s[-1-i]:
    print('No')
    exit()
    
for j in range((len(s)-3)//2):
  if s[j] != s[(len(s)-3)//2 - j]:
    print('No')
    exit()
    
print('Yes')
s = input()
n = len(s)
s2 =s[:(n-1)//2]
s3 = s[(n+1)//2:]

if s==s[::-1] and s2==s2[::-1] and s3==s3[::-1]:
  print('Yes')
else:
  print('No')