Problem:
 Score : 200 points    Problem Statement 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 1 akasaka      Sample Output 1 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.        Sample Input 2 level      Sample Output 2 No       Sample Input 3 atcoder      Sample Output 3 No

Solution (Python):
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = list(sys.stdin.buffer.readline().decode().rstrip())
    M = S[0: (len(S) - 1) // 2]
    U = S[(len(S) + 2) // 2:]
    print('Yes' if S == S[::-1] and M == M[::-1] and U == U[::-1] else 'No')


if __name__ == '__main__':
    main()

Solution (Python):

s = input()
sl=list(s)
N = len(sl)
k = 0
for i in range(int((N-1)/2)):
  if sl[i] != sl[N-i-1]:
    k = 1
    break
if k == 0:
  for i in range(int((N-1)/4)):
    if sl[i] != sl[int((N-1)/2-i-1)]:
      k = 1
      break
if k == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
n = len(s)

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

s2 = s[:int((n-1)/2)]
if s2 != s2[::-1]:
    print('No')
    exit()

s3 = s[int((n+3)/2-1):]
if s3 != s3[::-1]:
    print('No')
    exit()

print('Yes')

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

def St_Pal(str): return 1 if str == str[::-1] else 0

ans = 0
ans += St_Pal(s1)
ans += St_Pal(s2)
ans += St_Pal(s3)

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

Solution (Python):
s = input()

N=len(s)

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

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

Solution (Python):
s=input()
def kaibun(aa) :
  for i in range(len(aa)):
    if aa[i]!=aa[-i-1] :
      return False
    
  return True


b=int((len(s)-1)/2)
c=int((len(s)+3)/2)
mae=s[:b]
ato=s[c-1:]
if kaibun(s) and kaibun(mae) and kaibun(ato) :
  print ('Yes')
else :
  print('No')

Solution (Python):
s = input()
ret = True
for i in range(len(s)//2 - 1):
    if s[i] != s[len(s)-1-i]:
        ret = False
        break
    if s[i] != s[len(s)//2 -1 -i]:
        ret = False
        break
if ret:
    print('Yes')
else:
    print('No')

Solution (Python):

from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left

def L():
    return list(map(int, stdin.readline().split()))

def In():
    return map(int, stdin.readline().split())

def I():
    return int(stdin.readline())

P = 1000000007
s = input()
n = len(s)
if len(s)%2 == 0:
    print("No")
else:
    if s[0:(n-1)//2] == s[(n+1)//2:]:
        st1 = (s[0:(n-1)//2:-1])
        if st1 == st1[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def no():
    print('No')
    exit()

def main():
    s=list(input())
    n=len(s)
    s1=s[:n//2]
    s2=s[(n+3)//2-1:]
    for i in range(n//2):
        if s1[i]!=s2[i]: no()
    print('Yes')
            



if __name__ == "__main__":
    main()

Solution (Python):
s = input()
n = len(s)
a = (n-1)//2
b = (n+3)//2

c = s[0:a]
d = c[::-1]
e = s[b-1:n]
f = e[::-1]

t = s[::-1]

if c==d and e==f and s==t:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

List = list(S)
N = len(List)
N2 = int((N-1)/2)
ans = 1
arr = []

for i in range(N2):
  if List[i] == List[N-1-i]:
    arr.append(List[i])
  else:
    ans = 0

N3 = len(arr)
N4 = int(N3//2)
for i in range(N4):
  if arr[i] == arr[N3-1-i]:
    continue
  else:
    ans = 0

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

Solution (Python):
import sys

S = input()



N = len(S)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(0)

sub_S = S[:int((N - 1)/2)]
sub_S_rev = S[int((N + 3)/2)-1:]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(0)

print('Yes')

Solution (Python):
S = input()
left = ((len(S) - 1) // 2)
right = ((len(S) + 3) // 2) - 1
l_s = S[0:left]
r_s = S[right:len(S)]
if(S == S[::-1] and l_s == l_s[::-1] and r_s == r_s[::-1]):
  print("Yes")
else:
  print("No")

Solution (Python):
S= input()
N = len(S)
p1  = S[:(N - 1)//2]
p2  = S[(N + 3)//2 - 1:]




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

Solution (Python):
import sys
s = list(input())
n = len(s)
t = list(reversed(s))
if s != t:
    print("No")
    sys.exit()
else:
    u = s[:(n-1)//2]
    v = s[(n+1)//2:]
    w = list(reversed(u))
    x = list(reversed(v))
    if u == w and v == x:
        print("Yes")
    else:
        print("No")

Solution (Python):
s=input()
answer="Yes"
len=len(s)
for i in range(int((len-1)/2)):
    if s[i]!=s[len-i-1]:
        answer="No"
for j in range(int((len-1)//4)):
    if s[j]!=s[int((len-1)/2-j-1)]:
        answer="No"
    if s[int((len+1)/2+j)]!=s[len-j-1]:
        answer="No"
print(answer)

Solution (Python):
S = input()
N = len(S)


def f1(S):
    N = len(S)
    subset3 = S[0:(N - 2) // 2 + 1]
    subset4 = S[(N + 2) // 2:]
    return subset3, subset4


subset1, subset2 = f1(S)
_subset2 = ''.join(list(reversed(subset2)))
if subset1 != _subset2:
    print('No')
    exit()

if (N - 1) % 4 == 0:
    
    subset3 = subset1[:((N - 1) // 4)]
    subset4 = subset1[((N - 1) // 4):]
    _subset4 = ''.join(list(reversed(subset4)))
    
    subset5 = subset2[:((N - 1) // 4)]
    subset6 = subset2[((N - 1) // 4):]
    _subset6 = ''.join(list(reversed(subset6)))
    
else:
    subset3, subset4 = f1(subset1)
    _subset4 = ''.join(list(reversed(subset4)))
    subset5, subset6 = f1(subset2)
    _subset6 = ''.join(list(reversed(subset6)))
if subset3 != _subset4:
    print('No')
    exit()
if subset5 != _subset6:
    print('No')
    exit()
print('Yes')

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

Solution (Python):
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')

Solution (Python):

S = input()

for i in range((len(S)-1)//2):
    if S[i] == S[i+(len(S)+3)//2-1]:
        pass
    else:
        print("No")
        exit()
print("Yes")

Solution (Python):
def is_kaibun(string):
    return string == string[::-1]

def clip1(string, N):
    end = int((N-1)/2)
    return string[:end]

def clip2(string, N):
    start = int((N+3)/2)-1
    end = N
    return string[start:end]


s1 = input()
N = len(s1)

s2, s3 = clip1(s1, N), clip2(s1, N)






ans = 'Yes' if is_kaibun(s1) and is_kaibun(s2) and is_kaibun(s3) else 'No'
print(ans)

Solution (Python):
def IsKaibun(str):
    n = len(str)
    for i in range(n//2):
        if str[i]!=str[n-1-i]:
            return False
    return True

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

Solution (Python):
let=input()
s=[str(c) for c in let]
n=len(s)
for i in range(n//2):
    if s[i]!=s[-i-1]:
        print("No")
        exit()
k=(n-1)//2
for j in range(k):
    if s[j]!=s[k-j-1]:
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()

N = len(S)




rev_S = S[::-1]
a = S[:int((N-1)/2)]
rev_a = a[::-1]
b = S[int((N+2)/2):]
rev_b = b[::-1]

if S==rev_S and a==rev_a and b==rev_b:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
n=len(s)
hs=s[0:(n-1)//2]
ts=s[(n+3)//2:n-1]
print('Yes' if s == s[::-1] and hs == hs[::-1] and ts == ts[::-1] else 'No')

Solution (Python):
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())

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

Solution (Python):
s = input()
m = len(s) // 2
print('NYoe s'[s[:m] == s[m - 1::-1] == s[m + 1:]::2])

Solution (Python):
s=input()
nagasa=len(s)
liss=list(s)
revs=list(reversed(s))
zen=list(s[:(nagasa-1)//2])
revzen=list(reversed(zen))
kou=list(s[(nagasa+2)//2:])
revkou=list(reversed(kou))
if liss==revs and zen == revzen and kou== revkou:
    print("Yes")
else:
    print("No")

Solution (Python):
S=str(input())
P=S
for i in range(len(P)//2):
  if P[i]!=P[len(P)-1-i]:
    print('No')
    exit()
    
for i in range(len(P)//2):
  if P[i]!=P[len(P)-1-i]:
    print('No')
    exit()

P=S[(len(S)+3)//2-1:len(S)]
for i in range(len(P)//2):
  if P[i]!=P[len(P)-1-i]:
    print('No')
    exit()
    
print('Yes')

Solution (Python):
def is_strong_palindrome(s):
    if len(s) < 1:
        return True
    elif s != s[::-1]:
        return False

    left = s[:len(s) // 2]
    right = s[len(s) // 2 + (1 if len(s) % 2 != 0 else 0):]
    return left == left[::-1] and right == right[::-1]


if __name__ == '__main__':
    s = input()

    print("Yes" if is_strong_palindrome(s) else "No")

Solution (Python):
s = input()

n = len(s)

s_head= s[:int((n-1)/2)]
s_tail= s[int((n+3)/2)-1:]




s_tailr = ''.join(list(reversed(s_tail)))
if s_head == s_tail  and s_head == s_tailr:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)

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

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

for i in range(n//2):
    if t[i] != t[-i-1]:
        print('No')
        exit()
print('Yes')

Solution (Python):
s=input()
n0=len(s)
n1=(n0-1)//2
n2=(n0+3)//2

sr=s[::-1]
if s!=sr:
    print("No")
    exit()
    
s1=s[:n1]
s1r=s1[::-1]
if s1!=s1r:
    print("No")
    exit()

s2=s[n2-1:]
s2r=s2[::-1]
if s2!=s2r:
    print("No")
    exit()
    
print("Yes")

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

S = input()
N = len(S)

sta = (N - 1) // 2
end = (N + 3) //2

if is_kaibun(S):
    if is_kaibun(S[0:sta]):
        if is_kaibun(S[end - 1:]):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
S = input()

l = len(S)
end1 = round((l-1)/2)
end2 = round((l+3)/2)

if(S[0:end1] == S[end2-1:]):
        print("Yes")
else:
        print("No")

Solution (Python):

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

S = input().strip()
if len(S)%2 == 0:
    print('No')
else:
    if not check_p(S):
        print('No')
    elif not check_p(S[:(len(S) - 1)//2]):
        print('No')
    elif not check_p(S[((len(S) + 3)//2) - 1:]):
        print('No')
    else:
        print('Yes')

Solution (Python):
def ispalin(s):
    if(s==s[::-1]):
        return True
    else:
        return False
s=input()
n=len(s)
if(ispalin(s)):
    p=(n-1)//2
    q=(n+3)//2
    
    if(ispalin(s[:p])):
        if(ispalin(s[q-1:])):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools

sys.setrecursionlimit(100001)







def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




s = str(input())

s_list = list(s)
len_slist = len(s_list)

s_list_a = s_list[0: (len_slist-1)//2]
s_list_b = s_list[(len_slist+3)//2 - 1:]

s_list_rev = deepcopy(s_list)
s_list_rev.reverse()

s_list_a_rev = deepcopy(s_list_a)
s_list_a_rev.reverse()

s_list_b_rev = deepcopy(s_list_b)
s_list_b_rev.reverse()

flg = s_list == s_list_rev
flg_a = s_list_a == s_list_a_rev
flg_b = s_list_b == s_list_b_rev

if flg and flg_a and flg_b:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
s=list(s)
N=len(s)

def check(s):
    n=len(s)
    if n%2==1:
        lefts=s[:n//2]
        rights=s[n//2+1:]
    else:
        lefts=s[:n//2]
        rights=s[n//2:]
    if lefts!=rights[::-1]:
        return False
    else:
        return True

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

Solution (Python):
import sys
c = input()
n = len(c)
for i in range(int((n-1)/2)):
    if c[i] != c[-(i+1)]:
        print("No") 
        sys.exit()
temp = c[:int((n-1)/2)]
l_temp = len(temp)
for i in range(int((l_temp/2))):
    if temp[i] != temp[-(i+1)]:
        print("No") 
        sys.exit()
temp = c[int((n+3)/2)-1:]
l_temp = len(temp)
for i in range(int((l_temp/2))):
    if temp[i] != temp[-(i+1)]:
        print("No") 
        sys.exit()
print("Yes")

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

Solution (Python):
s = [_ for _ in input()]
n = len(s)

s0 = s[0:round((n-1)/2)]
s1 = s[round((n+3)/2-1):n]


def kaibun(ss):
    if ss[::-1] == ss:
        return True
    return False

if kaibun(s) and kaibun(s0) and kaibun(s1):
    print('Yes')
    exit(0)
print('No')

Solution (Python):
def is_kaibun(s):
    n = len(s)
    for i in range(n):
        if s[i] != s[n-1-i]:
            return False
    return True

def is_tsuyoi(s):
    n = len(s)
    if not is_kaibun(s):
        return False
    if not is_kaibun(s[:(n-1)//2]):
        return False
    if not is_kaibun(s[(n+3)//2-1:]):
        return False

    return True

S = input()

print('Yes' if is_tsuyoi(S) else 'No')

Solution (Python):



def main():
    S = input()
    N = len(S)
    flag = 'No'

    s1 = S[:int((N-1)/2)]
    s2 = S[int((N+3)/2)-1:]

    if S == S[::-1]:
        if s1 == s1[::-1]:
            if s2 == s2[::-1]:
                flag = 'Yes'
    
    print(flag)


if __name__ == '__main__':
    main()

Solution (Python):
flag=True
S=input()
for i in range(len(S)//2):
  if S[i]!=S[len(S)-1-i]:
    flag=False
if flag:
  for i in range(((len(S)-1)//2)//2):
    if S[i]!=S[(len(S)-1)//2-i-1]:
      flag=False
if flag:
  if S[:(len(S)-1)//2]!=S[(len(S)+3)//2-1:]:
    flag=False
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
def check(s):
    if kaibun(s) and kaibun(s[0:int((len(s) - 1) / 2)]) and kaibun(s[int((len(s) + 3) / 2) - 1:len(s)]):
        return 'Yes'
    else:
        return 'No'

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

if __name__ == "__main__":
    s = input()
    print(check(s))

Solution (Python):
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')

Solution (Python):
S = list(input())

N = len(S)
N1 = int((N - 1) / 2)
N2 = int((N + 3) / 2)
S0 = list(reversed(S))
S1 = list(reversed(S[:N1]))
S2 = list(reversed(S[N2-1:]))

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

Solution (Python):
import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random
from io import BytesIO, IOBase
 



 
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
 
def divs(n, start=1):
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors
 
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
 
def flin(d, x, default=-1):
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return (default, default)
    else:
        return (left, right)
 
def ceil(n, k): return n // k + (n % k != 0)
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def prr(a, sep=' '): print(sep.join(map(str, a)))
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
 
 

 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
	newlines = 0
 
	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = "x" in file.mode or "r" not in file.mode
		self.write = self.buffer.write if self.writable else None
 
	def read(self):
			while True:
					b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
					if not b:
							break
					ptr = self.buffer.tell()
					self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
			self.newlines = 0
			return self.buffer.read()
 
	def readline(self):
			while self.newlines == 0:
					b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
					self.newlines = b.count(b"\n") + (not b)
					ptr = self.buffer.tell()
					self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
			self.newlines -= 1
			return self.buffer.readline()
 
	def flush(self):
			if self.writable:
					os.write(self._fd, self.buffer.getvalue())
					self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
	def __init__(self, file):
			self.buffer = FastIO(file)
			self.flush = self.buffer.flush
			self.writable = self.buffer.writable
			self.write = lambda s: self.buffer.write(s.encode("ascii"))
			self.read = lambda: self.buffer.read().decode("ascii")
			self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
 

'''for _ in range(ii()):
    n=ii()
    a=li()
    m,k,md=0,0,0
    mn,mx=10**9+1,-10**9-1
    for i in range(n-1):
        if a[i]!=-1 and a[i+1]!=-1:
            m=max(m,abs(a[i]-a[i+1]))
    for i in range(1,n-1):
        if a[i]==-1:
            if a[i+1]!=-1:
                mn=min(mn,a[i+1])
                mx=max(mx,a[i+1])
            if a[i-1]!=-1:
                mn=min(mn,a[i-1])
                mx=max(mx,a[i-1])
    if mn==10**9+1 and mx==-10**9-1:
        print(0,0,sep=' ')
    else:
        md=(mn+mx+1)//2
        m=max(abs(mx-md),abs(mn-md),m)
        print(m,md,sep=' ')'''

'''for _ in range(ii()):
    n,m=mi()
    tg=n//2
    n0=n-m
    total=(n*(n+1))//2
    res=0
    if n0<n:
        if m>=tg:
            res=total-n0
        else:
            i=tg-m
            if n&1:
                nn0=2*i+1
            else:
                nn0=2*i
            res=total-((nn0*(nn0+1))//2)-(n0-nn0)
            
    print(res)'''



'''def solve():
    n=int(input())
    a=list(map(int,input().split()))
    diff=len(set(a))
    if diff==1: print (int((n*(n+1))/2))
    elif diff==n: print (1)
    else:
        i=j=ans=0
        ahead=True
        distinct={}
        while j<n:
            if ahead:
                distinct[a[j]]=distinct[a[j]]+1 if a[j] in distinct else 1
                if len(distinct)==diff:
                    ahead=False
                else:
                    j+=1
            else:
                ans+=n-j
                if distinct[a[i]]>1:
                    distinct[a[i]]-=1
                else:
                    distinct.pop(a[i])
                    j+=1
                    ahead=True
                i+=1
        print (ans)
 
solve()'''



'''s=input()
n=len(s)
i,cntl,cntg=0,0,0
res,fl,fg=0,0,0
while(i<n):
    if s[i]=='<':
        while(i<n and s[i]!='>'):
            fl=1
            cntl+=1
            i+=1
    else:
        while(i<n and s[i]!='<'):
            fg=1
            cntg+=1
            i+=1
    if fl==1 and fg==1:
        res+=max(cntl,cntg)
        cntl-=1
        cntg-=1
        res+=cntl*(cntl+1)//2
        res+=cntg*(cntg+1)//2
        fl,fg,cntl,cntg=0,0,0,0
if fl:
    res+=cntl*(cntl+1)//2
if fg:
    res+=cntg*(cntg+1)//2
print(res)'''




def isPalindrome(s):
    return s==s[::-1]
s=input()
n=len(s)
f=0
if isPalindrome(s) and isPalindrome(s[:n//2]) and isPalindrome(s[(n+2)//2:]):
    f=1
else:
    f=0
if f==1:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()

def ispalindrome(str): return 1 if str == str[::-1] else 0

if (ispalindrome(S) == 0):
    print("No")
    exit()

length = len(S)

if (ispalindrome(S[0:int((length - 1) / 2)]) == 0):
    print("No")
    exit()

part = length - (int((length + 3) / 2) - 1)

if (ispalindrome(S[int((length + 3) / 2) - 1:part]) == 0):
    print("No")
    exit()

print("Yes")

Solution (Python):
S = input()

def isPalin(s):
    flag = True
    for i in range(len(s)):
        if s[i] != s[-i-1]:
            flag = False
            break
    return flag

if isPalin(S) and isPalin(S[:(len(S)-1)//2]):
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()
N = len(S)
def f(a:str): 
  l = len(a)
  m = l // 2
  for i in range(m):
    if a[i] != a[l-i-1]:
      return False
  else:
    return True
if f(S) and f(S[:(N-1)//2]) and f(S[(N+1)//2:]):
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
n = len(s)

t = s[0:(n-1)//2]
l = s[1+(n-1)//2::]

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

if t == l and flag == 1:
  print("Yes")
else:
  print("No")

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

Solution (Python):
s=input()
n=len(s)
ans="Yes"
for i in range(n//2):
    if s[i]!=s[n-1-i]:
        ans="No"
for j in range(n//2):
    if s[i]!=s[n//2-1-i]:
        ans="No"
for j in range(n//2):
    if s[n//2+1+i]!=s[-1-i]:
        ans="No"


print(ans)

Solution (Python):
S = input()

N = len(S)
halfN = int((N-1)/2)

Ans = 'Yes'

for indx in range(halfN):
    if S[indx] != S[(N-1)-indx]:
        Ans = 'No'

if Ans == 'No':
    print(Ans)
else:
    for halfIndx in range(int(halfN/2)):
        if S[halfIndx] != S[(halfN-1) - halfIndx]:
            Ans = 'No'
    print(Ans)

Solution (Python):
S = input()

Kugiri = len(S) // 2
if S == ''.join(list(reversed(S))):
    up = ''
    down = ''
    for i in range(0, Kugiri):
        up += S[i]
    for q in range(Kugiri + 1, len(S)):
        down += S[q]
    if up == ''.join(list(reversed(up))) and down == ''.join(list(reversed(down))):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
def resolve():
    S = input()
    N = len(S)
    L1 = (N-1)//2
    L2 = (N+3)//2

    if S[0:L1] == S[L2-1:N]:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    resolve()

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

Solution (Python):
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')

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

if kaibun(S):
    if kaibun(S[:(len(S)-1) // 2]):
        if kaibun(S[(len(S)+3-1) // 2:]):
            print('Yes')
            exit()

print('No')

Solution (Python):
import sys
input = sys.stdin.readline

S = input().strip()
n = len(S)


def check(S, n):
    if n % 2:
        for i in range((n - 1) // 2):
            if S[i] == S[n - 1 - i]:
                continue
            else:
                print('No')
                sys.exit()
    else:
        for i in range(n // 2):
            if S[i] == S[n - 1 - i]:
                continue
            else:
                print('No')
                sys.exit()


check(S, n)
check(S[:(n - 1) // 2], (n - 1) // 2)
check(S[(n + 3) // 2 - 1:], len(S[(n + 3) // 2 - 1:]))

print('Yes')

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

Solution (Python):


def kaibun(s):
    n = len(s)
    ret = 1
    for i in range(n // 2):
        if s[i] != s[n - i - 1]:
            ret *= 0

    return(ret)

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

    ans = kaibun(s)
    ans *= kaibun(s[:(n - 1) // 2])
    ans *= kaibun(s[(n + 1) // 2:])

    if ans == 1:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

Solution (Python):
n=str(input())
l = len(n)

n1 = int((l - 1) / 2) 
n2 = int((l + 3) / 2) - 1

s1 = n[0:n1]
s2 = n[n2:]

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

Solution (Python):
s = input()
def valid(string):
  return string == string[::-1]
if valid(s) and valid(s[:(len(s)-1)//2]) and valid(s[(len(s)+3)//2-1:]):
  print('Yes')
else:
  print('No')

Solution (Python):


s = list(input())
fl = True

sf = list(s)
sf.reverse()

if sf != s:
    fl = False
else:
    s1 = s[:len(s)//2]
    s1r = list(s1)
    s1r.reverse()
    if s1 != s1r:
        fl = False
    else:
        s2 = s[(len(s) + 3) // 2 - 1:]
        s2r = list(s2)
        s2r.reverse()
        if s2r != s2:
            fl = False

if fl:
    print('Yes')
else:
    print('No')

Solution (Python):








import sys
sys.setrecursionlimit(10 ** 5 + 10)


def resolve():

    S=str(input())
    l=len(S)
    """
    print(S[(l + 3) // 2-1:])
    print(S[l-1:(l + 3) // 2-2:-1])
    """

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


resolve()

Solution (Python):
S = input()
length = len(S)
S_rev = ''.join(reversed(S))
S_portion = S[0:(length-1)//2]
S_portion_rev = ''.join(reversed(S_portion))

if S == S_rev and S_portion == S_portion_rev:
	print("Yes")
else:
	print("No")

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

Solution (Python):
A = list(input())
n = len(A)

for i in range((n-1)//2):
  if A[i] != A[n-1-i]:
    print('No')
    break
else:
  for i in range((n-1)//2):
    if A[i] != A[(n-3)//2 - i]:
      print('No')
      break
  else:
    print('Yes')

Solution (Python):
def a(s):
  n = len(s)
  for i in range(n // 2):
    if s[i] != s[-(i + 1)]:
      return False

  return True


def test(s):
  if not a(s):
    return "No"

  n = len(s)
  if not a(s[:(n - 1) // 2]):
    return "No"

  if not a(s[(n + 3) // 2 - 1:]):
    return "No"

  return "Yes"


print(test(input().strip()))

Solution (Python):


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


isKaibun = True
for i in range((n-1)//2):
    if s[i] != s[-(i+1)]:
        isKaibun = False
if isKaibun:
    pass
else:
    print("No")
    exit()

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


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

Solution (Python):
import math
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)

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

S = ns()
N = len(S)



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

Solution (Python):
s = input()
n = len(s)

a = s[:(n-1)//2]
b = s[((n+3)//2)-1:]
s_r = "".join(list(reversed(s)))
a_r = "".join(list(reversed(a)))
b_r = "".join(list(reversed(b)))

if s==s_r and a==a_r and b==b_r:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
S2 = S[:int((N-1)/2)]
S3 = S[int((N+3)/2-1):]

def kaibun(string):
    if len(string) > 1:
        if string[0] == string[-1]:
            return kaibun(string[1:-1])
        else:
            return 0
    else:
        return 1

if kaibun(S)==1:
    if kaibun(S2) == 1:
        if kaibun(S3) == 1:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S = input()

def flip(S):

    flipedS = ""
    for i in range(len(S)-1, -1, -1):
        flipedS += S[i]

    return flipedS  

def main(S):

    N = len(S)
    flipedS = flip(S)
    
    frontS = S[:((N-1)//2)]
    rearS  = S[((N+3)//2)-1:]
    fliped_frontS = flip(frontS)
    fliped_rearS  = flip(rearS)
    

    if S == flipedS and frontS == fliped_frontS and rearS == fliped_rearS:
        return "Yes"
    else:
        return "No"

if __name__ == "__main__":

    answer = main(S)
    print(answer)

Solution (Python):

def is_strong_kaibun(s):
    
    if not is_kaibun(s):
        return False

    n = len(s)
    subs = s[:(n-1)//2]
    if not is_kaibun(subs):
        return False

    subs = s[((n+3)//2)-1:]
    if not is_kaibun(subs):
        return False

    return True

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


s = input()

if is_strong_kaibun(s):
    print("Yes")
else:
    print("No")