A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:
 - S is a palindrome.
 - Let N be the length of S. The string formed by the 1-st through ((N-1)/2)-th characters of S is a palindrome.
 - The string consisting of the (N+3)/2-st through N-th characters of S is a palindrome.
Determine whether S is a strong palindrome.

-----Constraints-----
 - S consists of lowercase English letters.
 - The length of S is an odd number between 3 and 99 (inclusive).

-----Input-----
Input is given from Standard Input in the following format:
S

-----Output-----
If S is a strong palindrome, print Yes;
otherwise, print No.

-----Sample Input-----
akasaka

-----Sample Output-----
Yes

 - S is akasaka.
 - The string formed by the 1-st through the 3-rd characters is aka.
 - The string formed by the 5-th through the 7-th characters is aka.
All of these are palindromes, so S is a strong palindrome.

Difficulty: introductory

Starter code:

Solutions:
s = input()


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


s_pali = is_palinedrome(s)
sub_pali_left = is_palinedrome(s[:len(s)//2])
sub_pali_right = is_palinedrome(s[len(s)//2+1:])

if s_pali and sub_pali_left and sub_pali_right:
    print('Yes')
else:
    print('No')


S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")

s = input()
n = len(s)
a = len(s) // 4
if s[:n // 2] == s[n // 2 + 1:]:
    print('Yes')
        
else:
    print('No')


s = input()
s1 = s[:len(s)//2]
s2 = s[len(s)//2+1:]
print("Yes" if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1] else "No")

import os, sys, re, math

S = input()

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


s = input()
n = len(s)

def judge_palindrome(s):
    if s == s[::-1]:
        return True
    else:
        return False

if judge_palindrome(s) and judge_palindrome(s[:(n - 1) // 2]) and judge_palindrome(s[(n + 3) // 2 - 1:]):
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

import sys
s=list(input())
r=list(reversed(s))
n=len(s)

for i in range(n):
    if s[i]!=r[i]:
        print('No')
        return

s1=s[:]

del s1[(n-1)//2:]
r1=list(reversed(s1))

for i in range(len(s1)):
    if s1[i]!=r1[i]:
        print('No')
        return

s2=s[:]

del s2[:(n+3)//2-1]
r2=list(reversed(s2))

for i in range(len(s2)):
    if s2[i]!=r2[i]:
        print('No')
        return
print('Yes')

s = input()

if s == s[::-1]:
    f = s[:len(s)//2]
    b = s[len(s)//2 + 1:]
    if f == f[::-1] and b == b[::-1]:
        print('Yes')
        return

print('No')

S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2:]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')



import math
s = list(input())
n = len(s)
s1 = s[ : (n-1) // 2]
s2 = s[(n+3) // 2 - 1 : n]
flag = 1

for i in range(len(s) // 2):
    if s[i] != s[- i - 1]:
        flag = 0

for i in range(len(s1) // 2):
    if s1[i] != s1[- i - 1]:
        flag = 0

for i in range(len(s2) // 2):
    if s2[i] != s2[- i - 1]:
        flag = 0

print(('Yes' if flag == 1  else 'No'))


s = list(input())
s_front = s[:(len(s)//2)]
s_back = s[::-1][:(len(s)//2)]

result = 'Yes'

for f, f_r, b, b_r in zip(s_front, s_front[::-1], s_back, s_back[::-1]):
    if f != f_r or b != b_r or f != b:
        result = 'No'

print(result)

S = input()
N = len(S)

def palindrome(string):
  return 0 if string==string[::-1] else 1

ls1 = S[0:int((N-1)/2)]
ls2 = S[int((N+3)/2-1):N]

#print(ls1)
#print(ls2)


if palindrome(S) == palindrome(ls1) == palindrome(ls2) == 0:
  print('Yes')
else:
  print('No')

s = input()
s1 = s[:len(s) // 2]
s2 = s[:len(s) // 2:-1]
s3 = s[len(s) // 2 + 1:]

if s1 == s2 == s3:
    print('Yes')
else:
    print('No')


s = input()
n = len(s)
if s != s[::-1]:
  print("No")
elif s[0:(n-1)//2] != s[(n-1)//2-1::-1]:
  print("No")
elif s[(n+3)//2-1:n] != s[n-1:(n+3)//2-2:-1]:
  print("No")
else:
  print("Yes")

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()

ans = True

if s != s[::-1]:
    print('No')
    return

n = len(s)
m = int((n-1)/2)
s_2 = s[0:m]

if s_2 != s_2[::-1]:
    print('No')
    return

l = int((n+3)/2) - 1
s_3 = s[l:]

if s_3 != s_3[::-1]:
    print('No')
    return

print('Yes')


S = input()

def isKaibun(s1) :
    s2 = ""
    i = len(s1)
    
    while(i > 0) :
        i -= 1
        s2 += s1[i]
    if(s1 == s2) :
        return True
    return False

con1 = isKaibun(S)
con2 = isKaibun(S[:(len(S)-1)//2])
con3 = isKaibun(S[(len(S)+3)//2-1:])
if(con1 and con2 and con3) :
    print("Yes")
else :
    print("No")

def main():
    S = input()
    def first(s):
        return s == s[::-1]
    def second(s):
        n = len(s)
        return s[:(n-1)//2] == s[:(n-1)//2:-1]
    def third(s):
        n = len(s)
        temp = s[(n+3)//2-1:]
        return temp == temp[::-1]

    return "Yes" if  first(S) and second(S) and third(S) else "No"


def __starting_point():
    print(main())
__starting_point()

def is_palindrome(s: str) -> bool:
    return s == s[::-1]


def answer(s: str) -> str:
    if not is_palindrome(s):
        return 'No'

    strings = [s[:(len(s) - 1) // 2], s[(len(s) + 3) // 2 - 1:]]
    for i in strings:
        if not is_palindrome(i):
            return 'No'

    return 'Yes'


def main():
    s = input()
    print((answer(s)))


def __starting_point():
    main()

__starting_point()

# ABC159

def is_kaibun(string):

    for i in range((len(string)//2)+1):
        if string[i] != string[len(string)-i-1]:
            return False
    else:
        return True


S = input()
if is_kaibun(S) and is_kaibun(S[0:(len(S)-1)//2]) and is_kaibun(S[((len(S)+3)//2)-1:len(S)]):
    print("Yes")
else:
    print("No")

s=input()
n=len(s)
check=True
for i in range(n):
  if s[i]!=s[n-i-1]:
    check=False
for i in range((n-1)//2):
  if s[i]!=s[(n-1)//2-i-1]:
    check=False
  if s[i+(n+1)//2]!=s[n-i-1]:
    check=False
print("Yes" if check else "No")

S=input()
N=len(S)
SS=S[0:(N-1)//2]
SSS=S[(N+1)//2:N+1]

for i in range((N-1)//2):
  if S[i]!=S[-1-i]:print('No');return
  if SS[i]!=SS[-1-i]:print('No');return
  if SSS[i]!=SSS[-1-i]:print('No');return
print('Yes')

S = list(input())
S1 = S[:(len(S)-1)//2]
S1 = S[(len(S)+1)//2:]
if S == list(reversed(S)):
    if S1 == list(reversed(S1)):
        print('Yes')
    else:
        print('No')
else:
    print('No')

S=input();l=len(S)//2;print("YNeos"[any(map(lambda s:any(c!=d for c,d in zip(s,s[::-1])),[S,S[:l],S[-l:]]))::2])

S = input()
l = len(S) // 2
former = S[:l]
latter = S[l+1:]
print("Yes" if S == S[::-1] and former == former[::-1] and latter == latter[::-1] else "No")

s = input()
l = len(s)
okey = 1
ll = l//2

for i in range(0,l//2):
    if s[i] != s[l-i-1]:
        okey = 0
        break

if okey == 1: 
    for i in range(0,ll//2):
        if s[i] != s[ll-i-1]:
            okey = 0
            break

if okey == 1:
    for i in range(ll+1, ll+ll//2):
        if s[i] != s[l-i-1]:
            okey = 0
            break

if okey == 1:
    print("Yes")
else:
    print("No")

s=input();n=len(s)//2;print('YNeos'[s[:n]!=s[n+1:]::2])

def resolve():
    s = input()
    if s == s[::-1]:
        s_1 = s[:len(s)//2]
        s_2 = s[(len(s)+1)//2:]
        if (s_1 == s_1[::-1]) and (s_2 == s_2[::-1]):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
resolve()

S = input()
N = len(S)

ret = 'Yes'
for s1, s2 in list(zip(S, reversed(S)))[:N//2]:
    if s1 != s2:
        ret = 'No'
        break
s = S[:N//2]
for s3, s4 in list(zip(s, reversed(s)))[:N//4]:
    if s3 != s4:
        ret = 'No'
        break

print(ret)



s=input()

n = len(s)
for i in range(n//2):
  if s[i] != s[n-1-i]:
    print('No')
    return

n_left = int((n-1)/2)
for i in range(n//4):
  if s[i] != s[n_left-1-i]:
    print('No')
    return

n_right = int((n+3) / 2)-1
for i in range(n//4):
  if s[i+n_right] != s[n-1-i]:
    print('No')
    return

print('Yes')

s = input()

n = len(s)

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

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



if s != s[::-1] or s1 != s1[::-1] or s2 != s2[::-1]:
    print('No')
else :
    print('Yes')

S=input()
class Palindrome:
    def __init__(self,string):
        self.string=string
    def jugde_paindrome(self):
        if self.string==self.string[::-1]:
            return True
        else:
            return False

before=S[:int((len(S)-1)/2)]
after=S[int((len(S)-1)/2)+1:]
S_judge=Palindrome(S)
before_judge=Palindrome(before)
after_judge=Palindrome(after)

if S_judge.jugde_paindrome()==True and after_judge.jugde_paindrome()==True and before_judge.jugde_paindrome()==True:
    print("Yes")
else:
    print("No")

S=input()
N=len(S)
def isPalindrome(s):
  n = len(s)
  flag=True
  slist=list(s)
  for i, c in enumerate(slist):
    if c!=slist[n-1-i]:
      flag=False
    if i > n-i:
      break
  return flag

Slist=list(S)

if isPalindrome(S) and \
   isPalindrome(Slist[0:int((N-1)/2)]) and \
   isPalindrome(Slist[int((N+3)/2)-1:N]):
  print('Yes')
else:
  print('No')

s = input()
n = len(s) // 2

if s[:n] == s[n+1:]:
    print('Yes')
else:
    print('No')


kaibunkai = input()
n = len(kaibunkai)
zenhan = kaibunkai[:(n-1)//2]
kouhan = kaibunkai[(n+3)//2-1:]


def kaibun_desuka(bun):
  s = len(bun)
  for x in range(s//2):
    if bun[x] != bun[-x-1]:
      return False
  return True

if kaibun_desuka(kaibunkai) and kaibun_desuka(zenhan) and kaibun_desuka(kouhan):
  print("Yes")

  
else:
  print("No")
    


n=input()
leng=len(n)
a=n[0:leng//2]
b=n[(leng+3)//2-1:]
if n==n[::-1] and a==a[::-1] and b==b[::-1]:
   print("Yes")
else:
   print("No")

S = input()
ans = 'Yes'
def kaibun(Str):
    N = len(Str)//2
    re = True
    for i in range(N):
        if Str[i] == Str[-i-1]:
            continue
        else:
            re = False
    return re

N = len(S)
if not kaibun(S):
    ans = ('No')
if not kaibun(S[:(N-1)//2]):
    ans = ('No')
if not kaibun(S[(N+3)//2-1:]):
    ans = ('No')

print(ans)

s = input()

a = s[:len(s)//2]
b = s[len(s)//2+1:]
print('Yes' if s == s[::-1] and a == a[::-1] and b == b[::-1] else 'No')

# coding=utf-8

def tk(s):
    s1 = s[0:len(s)//2+1]
    s2 = s[len(s)//2:len(s)]

    #print(s1, s2)

    if s1 == s2[::-1]:
        return True
    else:
        return False

def Kaibun(s):
    if s == s[::-1]:
        return True
    else:
        return False

def __starting_point():
    S = input()
    #print(len(S)//2)
    #print(S[0:len(S)//2])

    if tk(S) and Kaibun(S[0:len(S)//2]) and Kaibun(S[len(S)//2+1:len(S)]):
        print('Yes')

    else:
        print('No')
__starting_point()

s = input()
n = len(s)
a = len(s) // 4
if s[:n // 2] == s[n // 2 + 1:]:
    print('Yes')
        
else:
    print('No')


S = str(input())
forward = ''
back = ''
for i in range(0, ((len(S)-1)//2)):
  forward += S[i]
for j in range(((len(S)+3)//2)-1, len(S)):
  back += S[j]
if forward == back:
  print('Yes')
else:
  print('No')

s = input()
n = len(s)

if s == s[::-1]:
    check = s[0:(n-1)//2]
    if check == check[::-1]:
        check = s[(n+3)//2-1:]
        if check == check[::-1]:
            print("Yes")
            return
print("No")

s = input()
n = len(s)

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

if f(s) and f(s[:(n-1)//2]) and f(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")

string=input()
palindrome=False
palin1=False

def palin(string):
    palindrome=False
    if string==string[::-1]:
        palindrome=True
    return palindrome

palindrome=palin(string)

if palin(string[int((len(string)-1)/2)])==True and palindrome==True:
    palin1=True
if palin(string[int((len(string)+3)/2)-1:len(string)])==True and palin1==True:
    print("Yes")
else:
    print("No")

def main():
    S = input()

    N = len(S)
    for i in range(N):
        if S[i] != S[N-i-1]:
            print("No")
            return

    M = (N-1)//2
    for i in range(M):
        if S[i] != S[N-i-1]:
            print("No")
            return

    L = (N+3)//2 - 1
    for i in range(L, N):
        if S[i] != S[N+L-i-1]:
            print("No")
            return

    print("Yes")


main()


import math
S=input()
r=len(S)
z=0
str_list=[]
while z<r:
    str_list.append(S[z])
    z=z+1

N=len(str_list)
x=math.floor((N-1)/2)
y=math.floor((N+3)/2)

s=0

list1=str_list[::-1]

if list1==str_list:
    s=s+1

list2=[]
list3=[]

t=0
while t<x:
    list2.append(str_list[t])
    t=t+1

list4=list2[::-1]
if list2==list4:
    s=s+1

u=y-1
while u<N:
    list3.append(str_list[u])
    u=u+1

list5=list3[::-1]
if list3==list5:
    s=s+1



if s==3:
    print('Yes')
else:
    print('No')


S = input()

#print ((len(S)-1)//2)
#print ((len(S)+3)//2)
#print (S[0:(len(S)-1)//2])
#print (S[((len(S)+3)//2)-1:len(S)])
#print (S[::-1])

Skai1 = S[0:(len(S)-1)//2]
Skai1 = Skai1[::-1]
Skai2 = S[((len(S)+3)//2)-1:len(S)]
Skai2 = Skai2[::-1]

if S==S[::-1] and S[0:(len(S)-1)//2] ==Skai1 and S[((len(S)+3)//2)-1:len(S)] == Skai2: 
  print('Yes')
else:
  print("No")

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

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



s = input()
sf = s[:int((len(s)-1)/2)]
sl = s[int((len(s)+3)/2)-1:]
if s == s[::-1] and sf == sf[::-1] and sl == sl[::-1]:
    print('Yes')
else:
    print('No')

def readinput():
    s=input()
    return s

def isKaibun(s):
    i=0
    j=len(s)-1
    while i<=j:
        if s[i] != s[j]:
            return False
        else:
            i+=1
            j-=1
    return True

def main(s):
    if not isKaibun(s):
        return 'No'
    n=len(s)
    m=(n-1)//2
    l=(n+3)//2
    if not isKaibun(s[:m]):
        return 'No'
    if not isKaibun(s[l-1:]):
        return 'No'
    return 'Yes'

def __starting_point():
    s=readinput()
    ans=main(s)
    print(ans)

__starting_point()

# 159 B
S = input()
N = len(S)
Sf = S[0:(N-1)//2]
NSf = len(Sf)
Sb = S[(N+3)//2 -1:N+1]
NSb = len(Sb)
ans = 0

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

for i in range(NSf//2):
    if Sf[i:i+1] != Sf[NSf-1-i:NSf-i]:
        ans = 1
        
for i in range(NSb//2):
    if Sb[i:i+1] != Sb[NSb-1-i:NSb-i]:
        ans = 1
        
print('Yes') if ans == 0 else print('No')

import sys

def isKaibun(S):
    for i in range(len(S)//2):
        if not S[i] == S[len(S)-1-i]:
            return False
            return
    return True

S = input()
N = len(S)

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

if isKaibun(S) and isKaibun(S1) and isKaibun(S2):
    print("Yes")
else:
    print("No")

import math
import sys
##### graph implementation with adjacancy list#####
class Graph:
    def __init__(self,Nodes,is_directed=False):
        self.nodes=Nodes
        self.adj_list={}
        self.is_directed=is_directed
 
        for node in self.nodes:
            self.adj_list[node]=[]
            
    def add_edge(self,u,v):
        self.adj_list[u].append(v)
        if self.is_directed==False:
            self.adj_list[v].append(u)
 
    def print_graph(self):
        for node in self.nodes:
            print((node,"->",self.adj_list[node]))
 
    def degree_node(self,node):
        return len(self.adj_list[node])
 
    def dfsUTIL(self,v,visited,parents=[]):
        #print(v,end=" ")
        visited[v]=True
        for i in self.adj_list[v]:
            if visited[i]==False:
                self.dfsUTIL(i,visited,parents)
                parents.append(i)        
    
    def dfs(self,v):
        visited=[False]*(max(self.adj_list)+1)
        parents=[v]
        self.dfsUTIL(v,visited,parents)
        return len(parents)
        
#####sorting a dictionary by the values#####
def dict_sort(ans):
    ans=sorted(list(ans.items()),reverse=True,key=lambda kv:(kv[1]))
    
##### naive method for testing prime or not O(n^.5)#####
def is_prime(n):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            return False
    return True

#####swap function#####
def swap(a,b):
    temp=a
    a=b
    b=temp
    return a,b

#####Primes till Nth O(n)#####
def seive_primes(n):
    flag=[0]*(n+10)
    flag[1]=flag[0]=1
    i=2
    while i*i<=n+1:
        if flag[i]==0:
            j=i*i
            while j<=n+1:
                flag[j]=1
                j+=i
        i+=1
    return flag

#####all the prime factors of a number#####
def factors(n):
    d={}
    while(n%2==0):
        if 2 in d:
            d[2]+=1
        else:
            d[2]=1
        n/=2
    for i in range(3,int(n**0.5)+1,2):
        while(n%i==0):
            if i in d:
                d[i]+=1
            else:
                d[i]=1
            n/=i
    n=int(n)
    if n>1:
        d[n]=1
    return d

#####greatest common divisor of two numbers#####
def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

#####least common multiplyer of two numbers#####
def lcm(a,b):
    return (a*b)//gcd(a,b)

#####function that return all the letters#####
def alphabates():
    return "abcdefghijklmnopqrstuvwxyz"

#####binary search O(logN)#####
def binary_search(ls,n,flag):
    low=0
    hi=n-1
    while(low<=hi):
        mid=(low+hi)//2
        if ls[mid]==flag:
            return mid
        elif ls[mid]>flag:
            hi=mid-1
        else:
            low=mid+1
    return -1

#####quadratic roots#####
def qdrt(a,b,c):
    chk=b*b-4*a*c
    if chk>=0:
        ans1=(-b+chk**0.5)/(2*a)
        ans2=(-b-chk**0.5)/(2*a)
        return [int(ans1),int(ans2)]
    return -1
#####permutations#####
def permutation(n,r):
    if n<r:
        return 0
    ans=1
    for i in range(n-r+1,n+1):
        ans*=i
    return ans

#####combinations#####
def combination(n,r):
    if n<r:
        return 0
    ans=1
    for i in range(r):
        ans*=(n-i)
    div=1
    for i in range(2,r+1):
        div*=i
    return ans//div
        
#####taking an array/list as input#####
def arinp():
    ls=list(map(int,input().split()))
    return ls

#####taking multiple inputs#####
def mult_inp():
    return list(map(int,input().split()))

#####Main function starts from here#####
def main():
    s=input()
    n=len(s)
    if s==s[::-1] and s[:n//2]==s[n//2+1:]:
        print('Yes')
    else:
        print('No')
def __starting_point():
    main()
    

    
    
    
            
    
    

__starting_point()

s = list(input())
n = len(s)
flag = 0
for i in range(n//2):
    if s[i] != s[n-i-1]:
        flag = 1
if flag == 0:
    s2 = s[:(n-1)//2]
    n2 = len(s2)
    for i in range(n2//2):
        if s2[i] != s2[n2-i-1]:
            flag = 1
#print(n, n2, s, s2)
if flag == 0:
    if flag == 0:
        s2 = s[(n+3)//2-1:]
        n2 = len(s2)
    for i in range(n2//2):
        if s2[i] != s2[n2-i-1]:
            flag = 1
#print(s2)
if flag == 0:
    print("Yes")
else:
    print("No")

N = str(input())
lenN = len(N)

fN =N[0:(lenN - 1)//2]
lN =N[(lenN + 3)//2-1:]
print((("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]*(0,1)[lN == fN]]))



s = input()
n = len(s)

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

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

s = input()
l = len(s)

def check(a):
  n = len(a)
  if n % 2 == 0:
    for i in range(n//2):
      if a[i] != a[n-i-1]:
        return False
    return True
  else:
    for i in range((n-1)//2):
      if a[i] != a[n-i-1]:
        return False
    return True

res = "No"
if check(s):
  #print(s)
  if check(s[:(l-1)//2]):
    if check(s[(l+3)//2 - 1:]):
      res = "Yes"

print(res)

S = input()
ans="No"
if S==S[::-1] and \
S[:int((len(S)-1)/2)]==S[:int((len(S)-1)/2)][::-1] and \
S[int((len(S)+3)/2)-1:]==S[int((len(S)+3)/2)-1:][::-1]:ans="Yes"
print(ans)

s = list(input())
s_front = s[:(len(s)//2)]
s_back = s[::-1][:(len(s)//2)]

result = 'Yes'

for f, f_r, b, b_r in zip(s_front, s_front[::-1], s_back, s_back[::-1]):
    if f != f_r or b != b_r or f != b:
        result = 'No'

print(result)

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


S = input()
n = len(S)

S1 = S[:(n-1)//2]
S2 = S[(n+1)//2:]

if check(S) and check(S1) and check(S2):
    print("Yes")
else:
    print("No")

S1 = input()
N = len(S1)

S2 = S1[::-1]

a = S1 == S2

S3 = S1[:int((N - 1) / 2)]
S4 = S3[::-1]

b = S3 == S4

S5 = S1[int((N + 3) / 2) - 1:]
S6 = S5[::-1]

c = S5 == S6

if a and b and c:
    print('Yes')

else:
    print('No')

S = input()
T = ""
U = ""
N = len(S)
for i in range((N-1)//2):
    T += S[i]
for i in range(((N-1)//2)-1,-1,-1):
    U += T[i]
if(T==U):
    if(S == T+S[(N-1)//2]+T):
        print("Yes")
        return
print("No")

s = input()
d = len(s)
n = int((d-1)/2)
for i in range(n):
  x = int((d-3)/2 -i)
  if s[i] == s[d-i-1] ==s[x]:
    continue
  else:
    print('No')
    return
print('Yes')

def judge_kaibun(S):
    return S == S[::-1]


S = input()

# 回文かどうか
if judge_kaibun(S):
    # 強い回文かどうか
    S_part1 = S[(len(S) + 1) // 2:]
    S_part2 = S[:(len(S) - 1) // 2]
    if judge_kaibun(S_part1) and judge_kaibun(S_part2):
        print("Yes")
    else:
        print("No")
else:
    print("No")


s = list(input())
n = len(s)
s1 = s[0:(n-1)//2]
s2 = s[(n-1)//2+1:n]
sr = list(reversed(s))
s1r = list(reversed(s1))
s2r = list(reversed(s2))

if s == sr and s1 == s1r and s2 == s2r:
    print("Yes")
    return

print("No")

import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


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


def solve():
    S = ins()
    n = len(S)
    return is_pal(S) and is_pal(S[: n // 2]) and is_pal(S[n // 2 + 1 :])


print("Yes" if solve() else "No")


S=input()
rS=S[::-1]

le=len(S)
cent=int((le+1)/2)

S1=S[0:cent-1]
S2=S[cent:]
rS1=S1[::-1]
rS2=S2[::-1]

if S==rS and S1==rS1 and S2==rS2:
  print("Yes")
else:
  print("No")


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

print('Yes' if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else 'No')

s = input()
n = len(s)

s1 = s[0:(n-1)//2]
s2 = s[(n+1)//2:n]

s_reverse = s[::-1]
s1_reverse = s1[::-1]
s2_reverse = s2[::-1]

if s == s_reverse and s1 == s1_reverse and s2 == s2_reverse:
    print("Yes")
else:
    print("No")

s=input()
n=(len(s)-1)//2
print('Yes' if s[:n]==s[n+1:] else 'No')

Ss = input().rstrip()

N = len(Ss)
S1s = Ss[:N//2]
S2s = Ss[(N+1)//2:]
#print('# S1s:', S1s)
#print('# S2s:', S2s)

if Ss == Ss[::-1] and S1s == S1s[::-1] and S2s == S2s[::-1]:
    print('Yes')
else:
    print('No')


S=input()
N=len(S)
s=''.join(list(reversed(S)))

T=S[0:int((N-1)/2)]
NT=len(T)
t=''.join(list(reversed(T)))

U=S[int((N+1)/2):N]
NU=len(U)
u=''.join(list(reversed(U)))

if S[0:int((N-1)/2)] == s[0:int((N-1)/2)] and T == t and U == u:
    print('Yes')
else:
    print('No')

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

s=input()
n=len(s)

if check(s) and check(s[:(n-1)//2]) and check(s[(n+3)//2-1:n]):
  print("Yes")
else:
  print("No")

def main():
    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')


def __starting_point():
    main()
__starting_point()

s = input()
n = len(s)
l1 = int((n-1)/2)
l2 = int((n+3)/2)
if s == s[::-1] and s[:l1] == s[l2-1:n] :   
    print('Yes')
else :
    print('No')

s = input()
str2 = s[0: (len(s) - 1) // 2]
str3 = s[(len(s) + 3) // 2: len(s) - 1]
if s == ''.join(list(reversed(s))) \
	and str2 == ''.join(list(reversed(str2))) \
	and str3 == ''.join(list(reversed(str3))):
	print('Yes')
else:
	print('No')

s = input()
if 4 < len(s) < 6:
  print('No')
  return

if s[::-1] != s:
  print('No')
  return
s = s[:len(s)//2]
if s[::-1] != s:
  print('No')
  return
print('Yes')

s = input()
N = len(s)
a = s[:N//2]
if N % 2 == 0:
    b = s[N//2:]
else:
    b = s[N//2+1:]

if a == a[::-1] and b == b[::-1] and a == b:
    print("Yes")
    return
print("No")

s = input()
n = len(s)
flag = False
 
 
def palind(S):
    size = len(S)
    for i in range(size//2):
        if S[i] != S[-1-i]:
            return False
    return True
 
 
 
if palind(s):
    m = (n-1)//2
    sb = s[:m]
    if palind(sb):
        sa = s[m+1:]
        flag = palind(sa)
 
print(("Yes" if flag else "No"))


s = input()
num = len(s)
n1 = s[0:(num-1) // 2]
n2 = s[(len(s)+3) // 2-1:]

if s == s[::-1] and n1 == n1[::-1] and n2 == n2[::-1]:
  print("Yes")
else:
  print("No")


s=input()
n=len(s)

if s[0:(n-1)//2]==s[(n+3)//2-1:n]:
    print('Yes')
else:
    print('No')


def main():
    s = input()
    n = len(s)
    for i in range(n//2):
        if s[i] != s[n-1-i]:
            print("No")
            return
    s1 = s[:(n-1)//2]
    s2 = s[(n+3)//2-1:]
    n1 = len(s1)
    for i in range(n//4):
        if s1[i] != s[n1-1-i]:
            print("No")
            return
        if s2[i] != s[n1-1-i]:
            print("No")
            return
    print("Yes")

def __starting_point():
    main()
__starting_point()

S = str(input())
s = list(map(str, S))
N = len(s)
t = 0
for i in range(int((N-1)/2)):
    if s[i] != s[N-i-1]:
        t += 1
        break
for i in range(int((N-1)/4)):
    if s[i] != s[int((N-1)/2) - i - 1]:
        t += 1
        break

if t == 0:
    print('Yes')
else:
    print('No')

s = input()

ans = 'No'
n = len(s)
if s == s[::-1]:
  tmp = s[0:(n-1)//2]
  if tmp == tmp[::-1]:
    tmp = s[(n+3)//2-1:]
    if tmp == tmp[::-1]:
      ans = 'Yes'
print(ans)

s=input()
if s[:]==s[::-1]:
    a=s[:((len(s)-1)//2)]
    if a[:]==a[::-1]:
        b=s[((len(s)+2)//2):]
        if b[:]==b[::-1]:
            print("Yes")
            return
print("No")

S=input()
N=len(S)
S_1=S[:int((N-1)//2)]
S_2=S[int((N+2)//2):]

if S==S[::-1] and S_1==S_1[::-1] and S_2==S_2[::-1]:
  print("Yes")
else:
  print("No")

s = list(input())
n = len(s)

a = int((n-1)/2)
b = int((n+3)/2)

for i in range(a):
  if s[i] != s[n-1-i]:
    print("No")
    return
    
for i in range(a):
  if s[i] != s[a-1-i]:
    print("No")
    return
    
for i in range(a):
  if s[b+i-1] != s[n-1-i]:
    print("No")
    return
    
print("Yes")

s = input()
n = len(s)
flag = False


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



if palind(s):
    m = (n-1)//2
    sb = s[:m]
    if palind(sb):
        sa = s[m+1:]
        flag = palind(sa)

print(("Yes" if flag else "No"))


S=input()
S2=S[:(len(S)-1)//2]
S3=S[(len(S)+3)//2-1:]
if S==S[::-1] and S2==S2[::-1] and S3==S3[::-1]:
  print("Yes")
else:
  print("No")

from fractions import Fraction

s = input()

tmp_1 = Fraction(len(s) - 1, 2)
tmp_2 = Fraction(len(s) + 3, 2)

a = s[0: int(tmp_1)]
b = s[int(tmp_2) - 1: int(len(s))]

print('Yes' if a == b else 'No')

#ABC159B
s = input()
n = len(s)
f = s[:(n-1)//2]
l = s[1+((n-1)//2):]
print("Yes" if s==s[::-1] and f==f[::-1] and l==l[::-1] else "No")

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

string = input()

ans = True
if not isParindrome(string):
    ans = False
if not isParindrome(string[(len(string)+1)//2:]):
    ans = False
if ans:
    print('Yes')
else:
    print('No')

S = input()
N = len(S)
def is_palindrome(s):
    return s == ''.join(list(reversed(s)))

ans = 'Yes' if is_palindrome(S) and is_palindrome(S[:(N-1)//2]) and is_palindrome(S[(N+1)//2:]) else 'No'
print(ans)

s = list(input())
b = 0
if len(s)%2==1:
    for a in range(int((len(s)-1)/2)):
        if s[a]!=s[len(s)-a-1] and b==0:
            b = 1
else:
    b = 1
if b == 0:
    for c in range(int((len(s)-1)/4+1)):
        if s[c]==s[int((len(s)-1)/2-c-1)]==s[int((len(s)+1)/2+c)]==s[len(s)-c-1] and b==0:
            b = 0
        else:
            b = 1
if b == 0:
    print("Yes")
elif b == 1:
    print("No")

kai = input()
num = len(kai)

ans = 0

n1 = int((num-1) / 2)

for i in range(n1):
    if kai[i] != kai[-1*(i+1)]:
        ans += 1

l1 = kai[0:n1]

for i in range(len(l1)):
    if l1[i] != l1[-1*(i+1)]:
        ans += 1

l2 = kai[n1+1:]

for i in range(len(l2)):
    if l2[i] != l2[-1*(i+1)]:
        ans += 1

if ans == 0:
    print("Yes")

else:
    print("No")

S = str(input())
N = len(S)
sList = [str(s) for s in S]
isPalindrome = 1
str1 = ''
str2 = ''
str3 = ''
str4 = ''

for i in range(N):
  if (sList[i] != sList[N - 1 - i]):
    isPalindrome = 0
if isPalindrome == 1:
  for i in range(int((N - 1) / 2)):
    str1 += sList[i]
    str2 += sList[int((N - 1) / 2 - 1 - i)]
    str3 += sList[int((N + 3) / 2 - 1 + i)]
    str4 += sList[N - 1 - i]
    
    if str1 != str2:
      isPalindrome = 0
    if str3 != str4:
      isPalindrome = 0
if isPalindrome == 0:
  print('No')
else:
  print('Yes')

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


s=input()
s1=s[:len(s)//2]
s2=s[len(s)//2+1:]
print('Yes' if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1] else 'No')

S = input()
N = len(S)

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


S = input()
N = len(S)
S_f = S[:int((N-1)/2)]
S_b = S[int((N+1)/2):]
a = []
for i in range(int(len(S)/2)):
    if S[i] == S[len(S)-i-1]:
        a.append(0)
    else:
        a.append(1)
for i in range (int(len(S_f)/2)):
    if S_f[i] == S_f[len(S_f)-i-1]:
        a.append(0)
    else:
        a.append(1)
for i in range (int(len(S_b)/2)):
    if S_b[i] == S_b[len(S_b)-i-1]:
        a.append(0)
    else:
        a.append(1)
if sum(a) == 0:
    print('Yes')
else:
    print('No')