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):
s=input()
n = len(s)

ss =s[::-1]

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

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


if s == ss and sss == mmm and ssss == mmmm:
    print('Yes')
else:
    print('No')

Solution (Python):
a=input()
list_1=list(a)
b=(len(list_1)-1)//2
c=(len(list_1)+3)//2
list_2=list_1[:b]
list_3=list_1[c-1:]
list_1r=list(reversed(list_1))
list_2r=list(reversed(list_2))
list_3r=list(reversed(list_3))
if list_1==list_1r:
  if list_2==list_2r:
    if list_3==list_3r:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Solution (Python):
import sys

S = input()


def is_palindrome(s):
    N = len(s)
    if N == 1:
        return True

    half = N // 2
    f = s[:half]
    r = s[-half:][::-1]
    return f == r


if is_palindrome(S) and is_palindrome(S[: len(S) // 2]):
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
    
for i in range(a//2):
  c=ord(s[i])
  d=ord(s[(a-1-i)])
  if c!=d:
    count+=1

for i in range((n-b+1)//2):
  c=ord(s[-(i+1)])
  d=ord(s[b-1+i])
  if c!=d:
    count+=1

if count!=0:
  print('No')
else:
  print('Yes')

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

def ch_kai(lst):
    new_lst = lst[::-1]
    if lst == new_lst:
        return True
    else:
        return False

if ch_kai(S) and ch_kai(S[0:int((N-1)/2)]):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
lenS = len(S)
def isPalin(Si):
    Slen = len(Si)
    firHalf = list(Si[:Slen//2])
    secHalfKai = list(Si[::-1][:Slen//2])
    palin = True
    for i in range(0,Slen//2):
        if firHalf[i] != secHalfKai[i]:
            palin = False
    return palin
good = False
if isPalin(S)==isPalin(S[:int((lenS-1)/2)])==isPalin(S[int((lenS+3)/2)-1:]) == True:
    good = True
if good:
    print('Yes')
else:
    print('No')

Solution (Python):
def palindrom(st):
    return st == st[::-1]
import math
s = input()
l = len(s)
print("Yes" if palindrom(s) and palindrom(s[:(l-1)//2]) and palindrom(s[(l+2)//2:]) else "No")

Solution (Python):
S = input()
l = len(S)
import sys
a = S[:(l-1)//2]
b = S[((l+3)//2)-1:l]

for i in range(len(a)//2):
    if str(a[i])==str(a[-i-1]):
        pass
    else:
        print('No')
        sys.exit(0)


for j in range(len(b)//2):

    if b[j]==b[-j-1]:
        pass
    else:
        print('No')
        sys.exit(0)


for k in range(l//2):
    if S[k] == S[-k-1]:
        pass
    else:
        print('No')
        sys.exit(0)

print('Yes')

Solution (Python):
s = input()





moji1 = s[: int((len(s) - 1) / 2)]
moji2 = s[int((len(s) + 2) / 2): int(len(s))]

moji3 = s[: int((len(s) - 1) / 2)]
moji4 = s[int((len(s) + 2) / 2): int(len(s))]
while int(len(moji1)) > 1:
    a = moji1[0:1]
    b = moji1[-1]
    if a != b:
        print('No')
        exit()
    moji1 = moji1[1:-1]
if (moji3 != moji4):
    print('No')
    exit()
print('Yes')

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

N_2 = (N+1) // 2 -1

if (N+1) % 4 == 0:
  N1 = N2 = (N+1) // 4 -1
  N3 = N4 = (N1+1) * 3 -1
else:
  N1 = (N-1) // 4 -1 
  N2 = N1 + 1
  N3 = N_2 + N1 +1
  N4 = N3 + 1
  



if S[0:N_2] == S[N_2+1:N][::-1] and S[0:N1+1] == S[N2:N_2][::-1] and S[N_2+1:N3+1] == S[N4:N][::-1]:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
N = len(S)
def ispalindrome(string): return True if string==string[::-1] else False

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

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

Solution (Python):
s = input()
n = int(len(s))
list = list(s)
lists = list[::-1]
list2 = list[0:(int((n-1)/2))]
list2s = list2[::-1]
list3 = list[int((n + 3)/2)-1:n+1]
list3s = list3[::-1]
count = 0

if list == lists:
    count = count + 1
if list2 == list2s:
    count = count + 1
if list3 == list3s:
    count = count + 1
if count == 3:
    print("Yes")
else:
    print("No")

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

ppp=S[:(N-1)//2]
qqq=S[(N+1)//2:]

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

Solution (Python):
S=input()
S=str(S)
N=len(S)
N=int(N)
if (3<=N<=99)and(N%2==1):
    c=(N-1)/2
    d=c+1
    c=int(c)
    d=int(d)
    S_1=S[0:c]
    S_2=S[d:]
    i=0
    for i in range(0,c):
        a=N-1-i
        a=int(a)
        b=(N-3)/2-i
        b=int(b)
        if (S[a]==S[i])and(S_1[i]==S_1[b])and(S_2[i]==S_2[b]):
            i+=1
            if i==c:
                print("Yes")
        else:
            print("No")
            break

Solution (Python):
def kaibun(strings):
    global flag
    for i in range(len(strings)):
        if strings[i] is not strings[len(strings)-1-i]:
            
            
            
            
            flag=1
            
            
        else:
            pass


S=input()
length=len(S)
S_2=S[0:(length-1)//2]

S_3=S[(length+3)//2-1:length]


flag=333

flag=0




kaibun(S)
kaibun(S_2)
kaibun(S_3)




if flag==0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(str(input()))

checker = 0
n = len(s)
new_s = list(reversed(s))
if s == new_s:
    checker += 1


split_s = s[0:(n-1)//2]
new_s = list(reversed(split_s))
if new_s == split_s:
    checker += 1


split_s = s[(n+2)//2:n]
new_s = list(reversed(split_s))
if new_s == split_s:
    checker += 1
if checker == 3:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

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

if solve(S) and solve(S[:round((len(S) - 1) / 2)]) and solve(S[round((len(S) + 3) / 2) - 1:]):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = int(len(s))
f = int((n - 1) /2)
th = int((n + 3)/2)
if n % 2 != 0 and 3 <= n <= 99:
    print("Yes") if s[0:f] == s[th-1:] else print("No")

Solution (Python):
S = input()
 
def ispalindrome(s):
    h = int(len(s) / 2)
    for a, b in zip(s[:h], reversed(s[h+1:])):
        if a != b: return 0
    return 1
 
index = int((len(S) - 1) / 2)
 
if ispalindrome(S) == 1:
  if ispalindrome(S[:index]) == 1:
    if len(S[:index]) >= 3:
      print("Yes")
    else:
      if len(S[:index]) == 1 and S[0] == S[2]:
        print("Yes")
      else:
        print("No")
  else:
    print("No")
else:
  print("No")

Solution (Python):
s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s) and is_palindrome(s[:(s_len-1)//2]) and is_palindrome(s[(s_len+3)//2-1:]):
    print("Yes")
else:
    print("No")

Solution (Python):
s = str(input())
n = len(s)
m = int(n)
d = int((n-1)/2)
e = int((n+3)/2)
a = s[:d]
b = s[e:m]
def yue(l):return 1 if l == l[::-1] else 0
S = yue(s)
A = yue(a)
B = yue(b)
if S + A == 2:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
N = len(S)
A = int((N - 1) / 2)
if A % 2 == 0:
  B = int(A / 2)
else:
  B = int((A - 1) / 2)
X = 0
 
for i in range(A):
  if S[i] != S[-i-1]:
    X += 1
 
if N >= 5:
  for i in range(B):
  	if S[i] != S[A-1-i]:
  	    X += 1
      
if X == 0:
  print("Yes")
else:
  print("No")

Solution (Python):


S = input()

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

Solution (Python):
from collections import deque

def reverse(p):
    q = p[::-1]
    if p == q:
        return True
    else:
        return False


S = input()

N = len(S)

pt1 = (N - 1) // 2 - 1
pt2 = (N + 3) // 2 - 1

ptS1 = S[:pt1 + 1]
ptS2 = S[pt2:]





if reverse(S) and reverse(ptS1) and reverse(ptS2):
    print('Yes')
else:
    print('No')

Solution (Python):
def ispalindrome(S,N):
    for a, b in zip(S[:N], reversed(S[:N])):
        if a != b: return 0
    return 1

def ispalindrome2(S,N):
    for a, b in zip(S[N2-1:N], reversed(S[N2-1:N])):
        if a != b: return 0
    return 1

S = input()
N = len(S)
N1 = (N-1)//2
N2 = (N+3)//2

r1 = ispalindrome(S,N)
r2 = ispalindrome(S,N1)
r3 = ispalindrome2(S,N2)
if r1==1 and r2==1 and r3==1:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
t = s[::-1]
n = len(s) // 2
ans = False
if s[0:n] == t[0:n]:
	if s[0:n] == s[n+1:n*2+2]:
		ans = True

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

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

a = s[0:int((n-1)/2)]
b = s[int((n+1)/2):n]

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

Solution (Python):
s = input()

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

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

Solution (Python):
S=input()
N=len(S)
f=0
for i in range((N-1)//4):
    if S[i]!=S[(N-3)//2-i]:
        f=-1
        
        break
for i in range((N+1)//2,(3*N+1)//4):
    if S[i]!=S[N-1-i]:
        f=-1
        
        break
for i in range((N-1)//2):
    if S[i]!=S[N-1-i]:
        f=-1
        
        break
if f==-1:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()



n = len(S)



list_S = list(S)



count = 0

for i in range((n-1)//2):
  if list_S[i] != list_S[n-1-i]:
    count += 1
if count > 0:
  print('No')
  exit()

list_left = list_S[0 : (n-1)//2]

list_right = list_S[(n+3)//2-1 : n]


n_edge = len(list_left)


if n_edge % 2 == 1:
  for i in range((n_edge-1)//2):
    if list_left[i] != list_left[n_edge-1-i]:
      print('No')
      exit()

if n_edge % 2 == 0:
  for i in range(n_edge//2):
    if list_left[i] != list_left[n_edge-1-i]:
      print('No')
      exit()


print('Yes')

Solution (Python):
S  = input()
N = len(S)
n1,n2 = ((N-1)/2),(N+3)/2
n1,n2 = int(n1),int(n2)
sh,st = S[:n1],S[n2-1:N]

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

Solution (Python):
s=input().strip()
l=len(s)
t=s[::-1]
if s!=t:
    print('No')
    exit()
u=s[:l//2]
v=u[::-1]
if u!=v:
    print('No')
    exit()
u=s[(l+1)//2:]
v=u[::-1]
if u!=v:
    print('No')
    exit()
print('Yes')

Solution (Python):
s = input()
s2 = (len(s)-1) // 2
s3 = (len(s)+3) // 2
if s != s[::-1]:
    print("No")
else:
    if s[0:s2] != ''.join(list(reversed(s[0:s2]))):
        print("No")
    else:
        if s[s3-1::] != ''.join(list(reversed(s[s3-1::]))):
            print("No")
        else:
            print("Yes")

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

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

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





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

for j in range((n//2) // 2):
    if s[j] != s[-j-(n//2)-2]:
        print("No")
        exit()

for j in range((n//2) // 2):
    if s[j+(n//2)+1] != s[-j-1]:
        print("No")
        exit()

print("Yes")

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

from decimal import *

























def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

inf = float('inf')
mod = 1000000007




def main():
	S = input()
	S = S[:-1]

	if kai(S) == True:
		tmp = len(S)
		tmp = (tmp -1) // 2
		if kai(S[:tmp]) == True:
			tmp = len(S)
			tmp = (tmp +3) // 2
			
			if kai(S[tmp-1:]) == True:

				print("Yes")
				sys.exit()
	print("No")







def kai(s):
	flg = True
	tmp = len(s)
	tmp = tmp //2

	for i in range(tmp):
		ii = (-1 * i) + -1
		if s[i] != s[ii]:
			flg = False
	return flg

def int_sqrt2(n):
    def f(prev):
        while True:
            m = (prev + n / prev) / 2
            if m >= prev:
                return prev
            prev = m

    return f(int(math.sqrt(n) * (1 + 1e-10)))



def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)

class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

if __name__ == "__main__":
	main()

Solution (Python):
text = str(input())
n = len(text)
target = (n-1)//2
 
bef = text[:target]
aft = text[target+1:]
 
if bef == aft:
  print("Yes")
else:
  print("No")

Solution (Python):

def reverse(s): 
    return s[::-1] 
  
def isPalindrome(s): 
    
    rev = reverse(s) 
  
    if (s == rev): 
        return True
    return False
def listToString(s):  

    str1 = ""  
    for ele in s:  
        str1 += ele   
   
    return str1   
    
s=input()
n = len(s)
p=int(round((n-1)/2))
q=int(round((n+3)/2))
ans = isPalindrome(s)


t1=[]
t2=[]

for i in range(0,p):
    t1.append(s[i])
for i in range(q-1,n):
    t2.append(s[i])    

ans1=isPalindrome(listToString(t1))
ans2=isPalindrome(listToString(t2))
if (ans==1 and ans1==1 and ans2==1):
    print ("Yes")
    
else:
    print("No")

Solution (Python):
S=input()
L=len(S)
count=0
for i in range(L//2):
	if S[i] == S[-i-1]:
		count+=1
	else:
		print("No")
		exit()

Sa=S[:(L-1)//2]
Sb=S[(L+3)//2-1:(L+1)]
La=len(Sa)
Lb=len(Sb)

for j in range(La//2):
	if Sa[j] == Sa[-j-1]:
		count+=1
	else:
		print("No")
		exit()
        
for k in range(Lb//2):
	if Sb[k] == Sb[-k-1]:
		count+=1
	else:
		print("No")
		exit()
print("Yes")

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

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

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

def is_kaibun(s):
    n = len(s)
    head = s[:(n - (n % 2)) // 2]
    tail = s[(n+(n%2)) // 2:]
    
    return head == tail[::-1]

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

Solution (Python):
S = input()
len = len(S)
flag = 0
for num in range((len-1)//2):
    if flag == 0:
        if S[num] != S[len-1-num]:
            print("No")
            flag = 1
        elif S[num] != S[((len-1)//2)-1-num]:
            print("No")
            flag = 1
if flag == 0:
    print("Yes")

Solution (Python):
s = list(input())
N = int(len(s))
a = int(((N-1)/2))
b = int(((N+3)/2))
s1 = s[0:a]
s2 = s[b:N-1]
if s1 == list(reversed(s1)) and s2 ==list(reversed(s2)) and s ==list(reversed(s)):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
s1 = s[:int((n-1)/2)]
s2 = s[int((n+1)/2):]
def is_kaibun(ss):
    for i in range(int((len(ss)+1)/2)):
        if ss[i]!=ss[-(i+1)]:
            return False
    return True
if is_kaibun(s1) and is_kaibun(s2) and is_kaibun(s):
    print("Yes")
else:
    print("No")

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

N=len(S)

if((N+1)%4 == 0):
    k=(N-1)//4+1
else:
    k=(N-1)//4

for i in range(0, (N-1)//4+1):
    if(S[i] == S[(N-1)//2-i-1] == S[i+(N+1)//2] == S[N-i-1]):
        if i == k-1:
            print("Yes")
            break;
        else:
            continue
    else:
        print("No")
        break;

Solution (Python):
from collections import deque
S = input()
N = len(S) 
s1 = deque(S[0:int((N-1)/2)])
s2 = deque(S[int((N+3)/2)-1:N])
t1 = deque(S[0:int((N-1)/2)])
t2 = deque(S[int((N+3)/2)-1:N])
ans = "None"
if len(S) == 3 and S[0] == S[2]:
    ans = "Yes"
while len(s1) >= 2:
    if s1.popleft() != s2.pop():
        ans = "No"
        break
    if len(s1) == 1 or len(s1) == 0:
        ans = "preYes"
        break

if ans == "preYes":
    while len(t1) >= 2:
        if t1.pop() != t1.popleft():
            ans = "No"
            break
        if len(t1) == 1 or len(t1) == 0:
            ans = "Yes"
            break
print(ans)

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

S_left = S[0:int(S_len/2)]
S_right = S[int(S_len/2)+1:]
def palindrome(string): return 0 if string==string[::-1] else 1

if(palindrome(S)== 0 and palindrome(S_left) == 0 and palindrome(S_right) == 0):
    print("Yes")
else:
    print("No")

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

a = S[0:(N - 1) // 2]
b = S[(N + 3) // 2 - 1:]

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

N2 = len(a)
c = a[::-1]
d = b[::-1]


if N2 % 2 == 0:
    
    
    
    
    if a[0:N2//2] == c[0:N2//2] and b[0:N2//2] == d[0:N2//2]:
        print('Yes')
    else:
        print('No')

if N2 % 2 == 1:
    
    
    
    
    if a[0:(N2+1)//2] == c[0:(N2+1)//2] and b[0:(N2+1)//2] == d[0:(N2+1)//2]:
        print('Yes')
    else:
        print('No')

Solution (Python):
char = str(input())
length = len(char)
char_len = ((length-1)/2)
char_list = list(char)
cnt = 0
list1 = []
list2 = []
newlist = []

while cnt != char_len:
    list1.append(char_list[cnt])
    cnt += 1

cnt2 = ((char_len * -1)-1)
cnt3 = -1
while cnt3 != cnt2:
    list2.append(char_list[cnt3])
    cnt3 -= 1

if list1 != list2:
    print('No')
else:
    for i in (reversed(list1)):
        newlist.append(i)
    if newlist == list1:
        print('Yes')
    else:
        print('No')

Solution (Python):

s = input()
n = len(s)

flag = True

if not s[:int(n/2)] == s[int(n/2)+1:][::-1]:
    flag = False


chk = s[:int((n-1)/2)]
len_ = len(chk)
if not len_ % 2 == 0:
    a = chk[:int(len_/2)]
    b = chk[int(len_/2)+1:]
else:
    a = chk[:int(len_/2)]
    b = chk[int(len_/2):]
len_ = len(chk)
if not a == b[::-1]:
    flag = False

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

len_ = len(chk)
if not len_ % 2 == 0:
    a = chk[:int(len_/2)]
    b = chk[int(len_/2)+1:]
else:
    a = chk[:int(len_/2)]
    b = chk[int(len_/2):]

len_ = len(chk)
if not a == b[::-1]:
    flag = False
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

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

if is_kaibun(s) and is_kaibun(s1) and is_kaibun(s2):
	print("Yes")
else:
	print("No")

Solution (Python):
s = str(input())
s_len = len(s)
def palindrome(string):
    if string==string[::-1]:
        return 1

    else:
        return 0

nn = (s_len - 1) // 2


mm = (s_len + 3) // 2 - 1


if palindrome(s) == 1 and palindrome(s[0:nn]) and palindrome(s[mm:]):
    
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
mr = s[::-1]
n = len(s)
f = 1

if s == mr:
  pass
else:
  f = 0
  


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

if s2 == mr:
  pass
else:
  f = 0



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

if s3 == mr:
  pass
else:
  f = 0
  
if f == 1:
  print("Yes")
else:
  print("No")

Solution (Python):
import math

def loop(string,length):
	first_str=string[0:length//2]
	if (length%2)==0:
		second_str=string[length//2:length]
	if (length%2)==1:
		second_str=string[length//2+1:length]
	second_str=second_str[::-1]
	if(first_str==second_str):
		return 1
	else:
		return 0

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

if(loop(S,N)==1) and loop(Astr,len(Astr))==1 and (loop(Bstr,len(Bstr))==1):
	print('Yes')
else:
	print('No')

Solution (Python):
import math

s = input()
list = list(s)


num = math.floor(len(s)/2)
count = 0


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


else:
    
    for i in range(num):
        if list[i] == list[num+1+i]:
            count += 1
        else:
            print("No")
            break

if len(s) == 3:
    None
else:
    if count == num:
        print("Yes")
    else:
        None

Solution (Python):
inp = input()
rev = inp[::-1]
num = len(inp)
harf = int(num/2)

start = inp[0:harf - 1]
end = rev[0:harf - 1]
ans = 0

if (inp == rev):
    lis_11 = inp[0:harf]
    lis_12 = rev[harf + 1:]

    if (lis_11 == lis_12):
        lis_21 = inp[harf + 1:]
        lis_22 = rev[0:harf]
        if (lis_21 == lis_22):
            ans += 1
if (ans == 1):
    print("Yes")
else:
    print("No")

Solution (Python):
from math import ceil
def kaibun(moji):
    N = len(moji)
    n = 0
    for i in range(int((N+1)//2)):
        if moji[i] == moji[N-i-1]:
            n += 1
    if n == int((N+1)//2) :
        return 1
    else:
        return 0

S = input()
N = len(S)
mae = S[:ceil((N-1)/2)]
ato = S[-ceil((N-1)/2):]
if kaibun(S) == 0:
    print("No")
elif kaibun(mae) == 1 and kaibun(ato) == 1:
    print("Yes")
else :
    print("No")

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

req1 = int((len(S) - 1) / 2)
req2 = int((len(S) + 3) / 2) - 1
if S == list(reversed(S)) and S[:req1] == list(reversed(S[:req1])) and S[req2:] == list(reversed(S[req2:])):
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
n=len(S)
left=int((n-1)/2)
right=int((n+3)/2)

cnt=0
for a, b in zip(S[:left], reversed(S[left+1:])):
  
  if a == b: 
    cnt += 1
if cnt==left:
  flag=1

  cnt=0
  for a, b in zip(S[right-1:], reversed(S[:n])):
    
    if a == b: 
      cnt += 1
    

  if cnt== left:
    print('Yes')
    exit() 
print("No")

Solution (Python):
S = input()

def kaibunChecker(string):
    if string == string[::-1]:
        return True
    else :
        return False
    
flag = False
N = len(S)

if kaibunChecker(S):
    s_front = S[0:(N-1)//2]
    if kaibunChecker(s_front):
        s_end = S[(N+2)//2]
        if kaibunChecker(s_end):
            flag = True

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

Solution (Python):
s = input()
n = len(s)
num_center_pre = (n - 1) / 2
num_center = int(num_center_pre)
for i in range(num_center):
    if s[i] != s[n - i - 1]:
        print("No")
        exit(0)
    if s[i] != s[num_center - i - 1]:
        print("No")
        exit(0)
    if s[num_center + i + 1] != s[n - i - 1]:
        print("No")
        exit(0)
print("Yes")

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

def reverse(s): 
    return s[::-1]

def isPalindrome(s): 
    rev = reverse(s) 
  
    if (s == rev): 
        return True
    return False

if isPalindrome(s):
    if n % 2 == 0:
        print("No")
    elif isPalindrome(s1) and isPalindrome(s2):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):


import sys

sys.setrecursionlimit(10 ** 6)


def main():
	s = sys.stdin.readline().rstrip()
	n = len(s)
	front = s[:(n-1)//2]
	end = s[(n+3)//2-1:]
	if len(front) % 2 == 0:
		ff = front[:len(front)//2]
		fe = front[len(front)//2:]
	else:
		ff = front[:len(front)//2]
		fe = front[len(front)//2+1:]
	if len(end) % 2 == 0:
		ef = end[:len(end)//2]
		ee = end[len(end)//2:]
	else:
		ef = end[:len(end)//2]
		ee = end[len(end)//2+1:]
	if front == end[::-1] and ff == fe[::-1] and ef == ee[::-1]:
		print("Yes")
	else:
		print("No")

main()

Solution (Python):
s = input()

def kaibun(word):
  return word[::-1] == word
ans_1 = str(kaibun(s))

n = len(s)
k_2 = int(((n-1) / 2))
w = [c  for c in s]
ww = []

for j in w:
  ww.append(j)
  if len(ww) == k_2:
    break
ans_2 = str(kaibun(ww))

w_2 = [d for d in s]
www = w_2[::-1]
n_2 = len(www)
k_3 = int(n_2-(n_2+3) / 2 +1)
ww_2 = []
for m in www:
  ww_2.append(m)
  if len(ww_2) == k_3:
    break
ans_3 = str(kaibun(ww_2))

if ans_1 == 'True' and ans_2 == 'True' and ans_3 == 'True':
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()

n = len(s)
l = int((n-1)/2)
b = int((n+3)/2)

for i in range(l - int(l/2)):
    if not s[i] == s[l-1-i]:
        print('No')
        exit()

for i in range(n-b - int((n-b)/2)):
    if not s[b-1+i] == s[n-1-i]:
        print('No')
        exit()

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

print('Yes')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    N = len(S)
    a = S[0:int((N-1)/2)]
    b = S[int((N+3)/2)-1:N]
    if a == b[::-1]:
        Na = len(a)
        if Na % 2 == 0:
            aa = a[0:int(Na/2)]
            ab = a[int(Na/2):Na]
        else:
            aa = a[0:int((Na - 1) / 2)]
            ab = a[int((Na + 3) / 2)-1:Na]
        Nb = len(b)
        if Nb % 2 == 0:
            ba = b[0:int(Nb/2)]
            bb = b[int(Nb/2):Nb]
        else:
            ba = b[0:int((Nb - 1) / 2)]
            bb = b[int((Nb + 3) / 2)-1: Nb]
        if aa == ab[::-1] and ba == bb[::-1]:
            print(YES)
        else:
            print(NO)
        return
    print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == '__main__':
    main()

Solution (Python):
S = str(input())
new_S = ''.join(list(reversed(S)))
N = len(S)
def check(n,r,s):
    for _ in range(int((r-n)/2 + 1)):
        S = list(s)
        if S[n] != S[r]:
            return("No")
        else:
            n += 1
            r -= 1
    return("Yes")
ans = 0
if S == new_S:
    ans += 1
if check(0,int((N-1)/2)-1,S) == "Yes":
    ans += 1
if check(int((N+3)/2)-1,N-1,S) == "Yes":
    ans += 1
if ans == 3:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
def is_anagram(s):
    return s == s[::-1]
S = input()
N = len(S)
if not is_anagram(S):
    print('No')
    sys.exit()
cond1 = int(((N-1)/2))
cond1 = S[0:cond1]
cond2 = int(((N+3)/2)-1)
cond2 = S[cond2:]
if is_anagram(cond1) and is_anagram(cond2):
    print('Yes')
else:
    print('No')

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

Solution (Python):
def main():
  s = input()
  
  if not is_kaibun(s):
    return 'No'
  if not is_kaibun(s[:len(s)//2]):
    return 'No'
  if not is_kaibun(s[(len(s)+3)//2-1:]):
    return 'No'
  
  return 'Yes'

def is_kaibun(value):
  temp = 0 if len(value) % 2 == 0 else 1
  if value[:len(value)//2] == ''.join(list(reversed(value[len(value)//2+temp:]))):
    return True
  return False
    

print(main())

Solution (Python):
kaibun = input()

j = True
for i in range(len(kaibun)//2):
    if kaibun[i] != kaibun[-(i+1)]:
        j = False
        break

if j == True:
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[len(kaibun)//2-(i+1)]:
            j = False
            break
        if kaibun[-(i+1)] != kaibun[len(kaibun)//2 + i+1]:    
            j = False
            break

if j == True:
    print("Yes")
else:
    print("No")

Solution (Python):
def isPal(arr):
    resp = True
    for i in range(0, int(len(arr) / 2)):
        if arr[i] != arr[len(arr) - i - 1]:
            resp = False
            break
    return(resp)

str = input()
resp = 'No'
if isPal(str):
    if isPal(str[0:(len(str) // 2)]) and isPal(str[(len(str) // 2) + 1:len(str)]):
        resp = 'Yes'
print(resp)

Solution (Python):
sen=input()
n=len(sen)
def func(arg):
  n=len(arg)
  if len(arg)%2==0:
    maemae=arg[:int(n/2)]
    usiusi=arg[int(n/2):]
    if maemae[::-1]!=usiusi:
      return False
    else:
      return True
  else:
    maemae=arg[:n//2]
    
    usiusi=arg[n//2+1:]
    if maemae[::-1]!=usiusi:
      return False
    else:
      return True


mae=sen[:n//2]

usiro=sen[n//2+1:]
if mae[::-1]!=usiro:
    print('No')
else:
  
  if func(mae)==1:
    print('Yes')
  else:
    print('No')

Solution (Python):
import math
s = str(input())

n = len(s)
k1 = math.ceil((n+1)/2)
sr1 = s[::-1]

s2 = s[0:int(k1-1)]
n2 = len(s2)
k2 = math.ceil((n2+1)/2)
sr2 = s2[::-1]


if s[0:int(k1-1)] == sr1[0:int(k1-1)] and s2[0:int(k2-1)] == sr2[0:int(k2-1)]:
    print('Yes')
else:
    print('No')

Solution (Python):
print("Yes" if (lambda x: x==''.join(list(reversed(x))) and x[0:len(x)//2]==''.join(list(reversed(x[0:len(x)//2]))) and x[len(x)-len(x)//2:len(x)]==''.join(list(reversed(x[len(x)-len(x)//2:len(x)]))))(input()) else "No")

Solution (Python):
s = input()
sl = list(s)

slen = len(sl)
ans = 1

second = int((slen - 1) / 2)
third = int((slen + 3) / 2)

for i in range(slen):
    if (sl[i] == sl[-1 - i]):
        continue
    else:
        ans = 0

if (ans == 1):
    for i in range(second):
        if (sl[i] == sl[second - i - 1]):
            continue
        else:
            ans = 0

j = -1
if (ans == 1):
    for i in range(third, slen):
        j = j + 1
        if (sl[i - 1] == sl[-1 - j]):
            continue
        else:
            ans = 0

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