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()
n1 = int(len(s)/2)
n2 =  int(n1/2)
t1 = s[:n1]
t2 = s[::-1][:n1]
if t1 == t2 and t1[:n2] == t1[::-1][:n2] and t2[:n2] == t2[::-1][:n2] :
    print('Yes')
else :
    print('No')

Solution (Python):
S = input()
N = len(S)
j1 = S == S[::-1]

j2_str = S[0:int((N+1)/2-1)]
j2 = j2_str == j2_str[::-1]


j3_str = S[int((N+3)/2-1):]
j3 = j3_str == j3_str[::-1]

if j1&j2&j3:
    ans = 'Yes'
else :
    ans = 'No'
print(ans)

Solution (Python):
S = input()
s = list(S)
s_len = len(s)
s_1 = s_len-1
t = int(s_1/2)
x = 0
y = 0
z = 0

for i in range(0,t):
    if s[i] == s[s_1-i]:
        x += 1
if x == t and t%2 == 1:
    k = int((t-1)/2)
    for i in range(0,k):
        if s[i] == s[t-i-1]:
            y += 1
        if s[t+1+i] == s[s_1-i]:
            z += 1
    if y == k and z == k:
        print('Yes')
    else:
        print('No')
elif x == t and t%2 == 0:
    k = int(t/2)
    for i in range(0,k):
        if s[i] == s[t-i-1]:
            y += 1
        if s[t+1+i] == s[s_1-i]:
            z += 1
    if y == k and z == k:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):

S = input()

S_list = list(S)

S_list_reverse = list(reversed(S_list))





if(S_list != S_list_reverse):
  print("No")
else:
  S_list_new = S_list
  del S_list_new[int(len(S_list)/2):]
  S_list_new_reverse =  list(reversed(S_list_new))
  if(S_list_new != S_list_new_reverse):
    print("No")
  else:
    print("Yes")

Solution (Python):

from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    s = list(input())
    n = len(s)
    srev = list(reversed(s))
    if not s == srev:
        print(no)
        exit()
    if not s[:(n-1)//2] == srev[1+(n-1)//2:]:
        print(no)
        exit()
    if not srev[:(n-1)//2] == s[1+(n-1)//2:]:
        print(no)
        exit()
    print(yes)



main()

Solution (Python):
s=input()
n=len(s)
f=1
for i in range((n-1)//2):
    if s[i]!=s[n-i-1]:
        f=-1
        break
if f==1:
    for i in range((n-1)//4):
        if s[i]!=s[(n-3-2*i)//2]:
            f=-1
            break
    
if f==1 and n!=3:
    for i in range((n+1)//2,(3*n+3)//4):
            if s[i]!=s[n-i-1]:
                f=-1
                break

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

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()
N = len(S)
ans = 'No'
cnt = 0
for i in range(int((N - 1) / 2) - 1):
    if S[i] == S[(-1) - i]:
        continue
    else:
        break
else:
    for i in range(int((N + 3) / 2) - 1, N - 1):
        if S[i] == S[(-1) - cnt]:
            cnt += 1
            continue
        else:
            break
    else:
        ans = 'Yes'
print(ans)

Solution (Python):
import sys
s = input()

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

for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
m = int((n+3)/2)
b = s[m-1:]
m= len(b)
for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
for i in range(int(n/2)):
    if s[i:(i+1)] != s[(n-i-1):n-i]:
        print('No')
        sys.exit()  
print('Yes')

Solution (Python):
S = list(input())
N = len(S)
flag = True
for i in range((N+1)//2-1):
    if S[i] != S[-1-i]:
        flag = False

mae = S[:((N-1)//2)]
ato = S[(N+3)//2-1:]

N = len(mae)
if N%2 == 1:
    for i in range((N+1)//2-1):
        if mae[i] != mae[-1-i]:
            flag = False
    for i in range((N+1)//2-1):
        if ato[i] != ato[-1-i]:
            flag = False
else:
    for i in range((N+1)//2):
        if mae[i] != mae[-1-i]:
            flag = False
    for i in range((N+1)//2):
        if ato[i] != ato[-1-i]:
            flag = False

if flag == True:
    print('Yes')
elif flag == False:
    print('No')

Solution (Python):
import sys; sys.setrecursionlimit(2147483647); input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log
from collections import Counter, defaultdict, deque
from operator import itemgetter
INF = float('inf'); MOD = 10**9+7
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(MI())
def LIR(n): return [LI() for i in range(n)]
def IS(): return input().rstrip()

def main():
    S = IS()
    N = len(S)
    if N%2 == 1:
        a = N//2
        if S[:a] == S[a+1:][::-1]:
            b = (N-1)//4
            if a%2 == 0:
                if S[:b] == S[b:a][::-1]:
                    c = (N+3)//2; d = c+(N-c)//2
                    if (N-c)%2 == 0:
                        if S[c-1:d-1] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        
                    else:
                        if S[c-1:d] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        
                
            else:
                if S[:b] == S[b+1:a][::-1]:
                    c = (N+3)//2; d = c+(N-c)//2
                    if (N-c)%2 == 0:
                        if S[c-1:d-1] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        
                    else:
                        if S[c-1:d] == S[d:][::-1]:
                            print('Yes')
                            sys.exit()
                        
                
        
    
    print('No')

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
q1 = 0
q2 = 0
q3 = 0
num = len(S)
num_2 = int((num -1)/2)
num_3 = int((num +3)/2-1)


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

q1 = ispalindrome(S)

S_2 = S[0:num_2]
q2 = ispalindrome(S_2)

S_3 = S[num_3:num]
q3 = ispalindrome(S_3)

if q1 == 1 and q2 == 1 and q3 == 1:
  print('Yes')
else:
    print('No')

Solution (Python):
s=input()

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

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

ans=["Yes","Yes","Yes"]

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

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

for i in range(((len(s)+3)//2)//2):
    
    if mo2[i]!=mo2[-(i+1)]:
        ans[2]="No"
        break

if "No" in ans:
    print("No")
else:
    print("Yes")

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

m = N//2 +1
l = S[:m-1]
r = S[m:]

def chk(str_):
	leng = len(str_)
	if leng == 1:
		return True
	elif leng%2 == 2:
		ll = str_[:leng//2]
		rr = str_[leng//2:]
	else:
		ll = str_[:leng//2]
		rr = str_[leng//2:]
	for a, b in zip(ll, reversed(rr)):
		if a != b:
			return False
	return True

if chk(S) and chk(l) and chk(r):
	print("Yes")
else:
	print("No")

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

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

A = int((n-1)/2)
B = int((n+3)/2)






if s[0 : A] == str(''.join(list(reversed(s[0 : A])))) and s[B-1 : n] == str(''.join(list(reversed(s[B-1 : n])))) and s == s[::-1]:
	print("Yes")
else:
	print("No")

Solution (Python):
s=input()
if len(s)%2==1:

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

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

n1 = int((n-1)/2)
s1 = s[0:n1]
s1_rev = s1[::-1]

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

if s1 == s1_rev and s2 == s2_rev and s == s_rev:
    print('Yes') 
else:
    print('No')

Solution (Python):

import sys
import collections
import heapq
import math
s = sys.stdin.readline().split()[0]
n = len(s)

def isP(s1):
    
    
    n1 = len(s1)
    
    
    return s1==s1[::-1]
    
    
    
        
    
    
    

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

Solution (Python):
s = input()
f = 0
a = 0; b = 0; c = 0
if len(s)==3 and s[0]==s[2]:
    print('Yes')
else :
    
    for i in range(len(s)//2):
        if s[i]==s[-1-i]:
            a += 1
        if a == len(s)//2:
            f += 1
    for i in range(len(s)//4):
        if s[i]==s[(len(s)-1)//2-1-i]:
            b += 1
        if b == len(s)//4:
            f += 1
        if s[(len(s)+3)//2-1+i]==s[len(s)-1-i]:
            c += 1
        if c == len(s)//4:
            f += 1
    print('Yes' if f == 3 else 'No')

Solution (Python):
s=input()
n=len(s)
for i in range(n):
    if s[i]!=s[n-i-1]:
        print("No")
        break
else:
    for i in range((n-1)//2):
        if s[i]!=s[(n-1)//2-1-i]:
            print("No")
            break
    else:
        for i in range((n+3)//2-1,n):
            if s[i]!=s[n-i+(n+3)//2-2]:
                print("No")
                break
        else:
            print("Yes")

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

ans = 'Yes'
for i in range(N):
    if S[i] != S[N-i-1]:
        ans = 'No'
        
    if i < (N-1)/2:
        if S[i] != S[N//2-i-1]:
            ans = 'No'
            
    elif i >= N//2+1:
        if S[i] != S[N-i+N//2]:
            ans = 'No'
            
print(ans)

Solution (Python):
def F(x):
    return x[0:len(x)//2] == x[::-1][0:len(x)//2]

s = input()
n = len(s)
sf = s[0:(n-1)//2]
sb = s[(n+3)//2-1:]
if F(sf) and F(sb) and F(s):
    print('Yes')
else:
    print('No')

Solution (Python):
ostr = input()

slist = list(ostr)
length = len(slist)
half = length // 2

flg1 = True
flg2 = True
flg3 = True

len2 =  (length-1)//2
list2 = slist[:len2]
half2 = len(list2) // 2

len3 = ((length+3)//2)-1
list3 = slist[len3:]
half3 = len(list3) // 2

def judge(s, h):
    for i in range(1, h+1):
        if s[i-1] != s[-i]:
            return False
    return True

flg1 = judge(slist, half)
flg2 = judge(list2, half2)
flg3 = judge(list3, half3)
if flg1 and flg2 and flg3:
    print("Yes")
else:
    print("No")

Solution (Python):


S = input()
N = len(S)

befor = S[0:(( N ) // 2)]
after = S[(( N + 1) // 2):N]
if ( befor == after ) :
    print("Yes")
else :
    print("No")

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

x = int((N-1)/2)
y = int((N+3)/2)

a = str(S[:x])
b = str(S[y:N-1])

reverse_S = ''.join(list(reversed(S)))
reverse_a = ''.join(list(reversed(a)))
reverse_b = ''.join(list(reversed(b)))

if str(S) == str(reverse_S) and str(a) == str(reverse_a) and str(b) == str(reverse_b):
  print('Yes')
else:
  print('No')

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

import sys
import math
flag1 = 0
flag2 = 0
flag3 = 0

if S == S[::-1]:
    flag1 = 1
else:
    print('No')
    sys.exit()

S1 = S[:(int((len(S) - 1)/2))]
if S1 == S1[::-1]:
    flag2 = 1
else:
    print('No')
    sys.exit()

S2 = S[int((len(S)+3)/2) - 1:]
if S2 == S2[::-1]:
    flag3 = 1
else:
    print('No')
    sys.exit()

if flag1 == 1 and flag2 == 1 and flag3 == 1:
    print('Yes')

Solution (Python):
S = input()

ind = (len(S) + 1) // 2

left = S[:ind-1]
right = S[ind:]

def check(x):
    if len(x) % 2 == 0:
        ind = len(x) // 2
        if x[:ind] == x[ind:][::-1]:
            return True
        else:
            return False
    else:
        ind = (len(x) + 1) // 2
        if x[:ind-1] == x[ind:][::-1]:
            return True
        else:
            return False

if check(S) and check(left) and check(right):
    print("Yes")
else:
    print("No")

Solution (Python):
import math

s = input()
n = len(s)

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

sm = int((n + 1) / 2)
s1m = math.ceil(len(s1) / 2)
s2m = math.ceil(len(s2) / 2)

if len(s1) % 2 == 0 or len(s2) % 2 == 0:
    if s[0 : sm - 1] == s[sm : n] \
    and s1[0 : s1m] == s1[s1m : int(len(s1))][::-1] \
    and s2[0 : s2m] == s2[s2m : int(len(s2))][::-1]:
        print("Yes")
    else:
        print("No")
else:
    if s[0 : sm - 1] == s[sm : n] \
    and s1[0 : s1m - 1] == s1[s1m : int(len(s1))][::-1] \
    and s2[0 : s2m - 1] == s2[s2m : int(len(s2))][::-1]:
        print("Yes")
    else:
        print("No")

Solution (Python):
s = list(input())
n = (len(s) - 1) // 2

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

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

n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)

l = []
m = []

for i in range(N):
    l.append(s[i])
    
for i in range (M-1,n):
    m.append(s[i])
    
a = ''.join(l)
l.reverse()
A = ''.join(l)

b = ''.join(m)
m.reverse()
B = ''.join(m)

t = s
t.reverse()
x = ''.join(s)
y = ''.join(t)

if (a==A and b==B and a == b):
    print('Yes')
else:
    print('No')

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

flag = True

S_r = S[::-1]

if S != S_r:
    flag = False


s_a = ""
for i in range((l-1)//2):
    s_a += S[i]

s_a_r = s_a[::-1]

if s_a != s_a_r:
    flag = False

s_b = ""
for i in range((l+2)//2,l):
    s_b += S[i]
s_b_r = s_b[::-1]

if s_b != s_b_r:
    flag = False

if flag:
    print("Yes")

else:
    print("No")

Solution (Python):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys


sys.setrecursionlimit(2147483647)

def main():
  s1 = input()
  n = len(s1)
  s2=s1[0:int((n-1)/2)]
  n2 = len(s2)
  s3=s1[int((n+3)/2-1):n]
  n3 = len(s3)
  tf = 'True'
  for i in range(n//2):
    if s1[i]!=s1[n-1-i]:
      tf='False'
  for i in range(n2//2):
    if s2[i]!=s2[n2-1-i]:
      tf='False'
  for i in range(n3//2):
    if s3[i]!=s3[n3-1-i]:
      tf='False'
  if tf=='True':
    print('Yes')
    
  else:
    print('No')
      
  
  

if __name__ == '__main__':
  main()

Solution (Python):
S=input()
N=len(S)
def P(S,N):
	if S[0:(N-1)//2]!=S[(N+1)//2:]:
		return "No"
	elif S[0:(N-1)//2]!=S[0:(N-1)//2][::-1]:
		return "No"
	else:
		return "Yes"
print(P(S,N))

Solution (Python):

def main():
    s = input()
    sr = s[::-1]

    N = int(len(s))
    s1 = s[:int((N-1)/2)]
    s1r = s1[::-1]
    s2 = s[int((N+1)/2):]
    s2r = s2[::-1]

    
    
    
    
    

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

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

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

    print("Yes")


if __name__ == '__main__':
    main()

Solution (Python):
S=input()
a=len(S)
kai=S[::-1]
c=int((a-1)/2)
kai_mae=S[:c]
kai_ato=S[-c:]
if S==kai and kai_mae==kai_mae[::-1] and kai_ato==kai_ato[::-1]:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()

def isKaibun(s):
    l = len(s)
    return all(s[i] == s[-1-i] for i in range(l))
    

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

Solution (Python):
s = list(input())
n = len(s)
result = 'Yes'
for i in range(n):
  if s[i] != s[n- 1 - i]:
    result = 'No'

for i in range(n):
  if i > (n - 1) // 2 - 1:
    break
  if s[i] != s[(n-1)//2 - 1 - i]:
    result = 'No'

for i in range(n):
  if (n+3)//2 - 1 >= i:
    pass
  if s[i] != s[n-1-i]:
    result = 'No'
print(result)

Solution (Python):
inputStr = input()
char_list = list(inputStr)

N = len(char_list)

cnt1 = (N - 1)/2
cnt1 = int(cnt1)
cnt2 = (N + 3)/2
cnt2 = int(cnt2)

str1 = []
str2 = []

i = 0
while i < cnt1:
    str1.append(char_list[i])
    i += 1

i = cnt2 -1
while i < N:
    str2.append(char_list[i])
    i += 1

if str1 == str2:
    print("Yes")
else:
    print("No")

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

if s.find(s[::-1])==0:
    if a.find(a[::-1])==0:
        if b.find(b[::-1])==0:
            print("Yes")
            exit()
print("No")

Solution (Python):
x = input()
x_len = len(x)

x_1 = x[0:(x_len-1)//2]
x_2 = x[(x_len+2)//2:]

if x == x[::-1] and x_1 == x_1[::-1] and x_2 == x_2[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
s_revers = s[::-1]


kaibun = True
n = len(s)
for i in range(n // 2):
    if s[i] != s[-i - 1]:
        kaibun = False
moji = (n - 1) // 2 - 1
for i in range(moji):
    if s[i] != s[moji - i]:
        kaibun = False
for i in range(moji):
    if s_revers[i] != s[moji - i]:
        kaibun = False
if kaibun:
    print('Yes')
else:
    print('No')

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

N=len(S)
i=0


while(True):
  
  if((S[i]==S[N-i-1]) and (S[i]==S[int(N/2)-i-1])):
    i=i+1
  else:
    print("No")
    break
  if(i==(int((N-1)/2))):
    print("Yes")
    break

Solution (Python):
import math
def check(s):
  
  n = len(s)
  n2 = math.ceil(n/2)


  for i in range(0,n2):
    ni = n-i
    if s[i:i+1] != s[ni-1:ni]:
      return False
  return True

s = input('')
if check(s):
  
  n2 = math.ceil((len(s)-1)/2)
  s2 = s[0:n2]

  if check(s2):
    
    n3 = math.ceil((len(s)+3)/2)
    s3 = s[n3-1:]

    if check(s3):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Solution (Python):
def check_2(s):
    n = s.__len__()
    x = (n-1)/2
    x = abs(x)
    x = int(x)
    temp = s[0:x]
    if isPalindrome(temp) == 1:
        return 1
    else:
        return 0

def check_3(s):
    n = s.__len__()
    x = (n + 3) / 2
    x = abs(x)
    x = int(x)
    temp = s[n:x]
    if isPalindrome(temp) == 1:
        return 1
    else:
        return 0
def reverse(s):
    return s[::-1]


def isPalindrome(s):
    
    rev = reverse(s)

    
    if (s == rev):
        return 1
    return 0

if __name__ == "__main__":
    s = input()
    result = 0
    if isPalindrome(s) == 1:
        result = 1
        if check_2(s) == 1:
            result = 1
            if check_3(s) == 1:
                result = 1
            else:
                result = 0
        else:
            result = 0
    else:
        result = 0
    if result == 1:
        print("Yes")
    else:
        print("No")

Solution (Python):
s = input()

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

l = len(s)
s_1 = s[0:l//2]
s_2 = s[l//2+1:]

if is_palindrome(s) and is_palindrome(s_1) and is_palindrome(s_2):
  print('Yes')
else:
  print('No')

Solution (Python):









import os
import sys


def main():
    S = input()
    N = len(S)
    S_b = S[:(N-1)//2]
    S_a = S[(N+1)//2:]
    for i in range((N+1)//2-1):
        if S[i]!=S[-(i+1)]:
            print("No")
            return 
    for i in range((len(S_b)+1)//2):
        if S_b[i]!=S_b[-(i+1)]:
            print("No")
            return 
    for i in range((len(S_a)+1)//2):
        if S_a[i]!=S_b[-(i+1)]:
            print("No")
            return 
    print("Yes")



if __name__ == "__main__":
    main()

Solution (Python):
ls = list(map(str,input()))
a=[]
b=[]
c=[]
d=[]
e=[]
f=[]
n = len(ls)
for i in range(int((n-1)/2)):
    a.append(ls[i])
for j in range(int((n+1)/2),n):
    b.append(ls[j])
b.reverse()
if b != a:
    print('No')
else:
    if (n-1) % 4 ==0:
        for k in range(int((n-1)/4)):
            c.append(a[k])
        for l in range(int((n-1)/4),int((n-1)/2)):
            d.append(a[l])
        for m in range(int((n-1)/4)):
            e.append(b[m])
        for n in range(int((n-1)/4),int((n-1)/2)):
            f.append(b[n])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')
    else:
        for k in range(int((n-3)/4)):
            c.append(a[k])
        for l in range(int((n+1)/4),int((n-1)/2)):
            d.append(a[l])
        for m in range(int((n-3)/4)):
            e.append(b[m])
        for n in range(int((n+1)/4),int((n-1)/2)):
            f.append(b[n])
        d.reverse()
        f.reverse()
        if (c == d) and (e == f):
            print('Yes')
        else:
            print('No')

Solution (Python):
wholeString = input()
firstSub = wholeString[0:int((len(wholeString)-1)/2)]
secondSub = wholeString[int(((len(wholeString)+3)/2)-1):]

if len(wholeString) % 2 == 0 or len(wholeString) < 3 or len(wholeString) > 99:
  print("No")
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1] and wholeString == wholeString[::-1]:
  print("Yes")
else:
  print("No")

Solution (Python):
s = str(input())
n = int(len(s))
inversion_s = s[::-1]
palindrome_0 = ""

for _ in range(int((n-1)/2)):
    palindrome_0 += s[_]

inversion_palindrome_0 = palindrome_0[::-1]

palindrome_1 = ""
for _ in range(int((n+3)/2) - 1, n):
    palindrome_1 += s[_]

inversion_palindrome_1 = palindrome_1[::-1]

if s == inversion_s:
    if palindrome_0 == inversion_palindrome_0:
        if palindrome_1 == inversion_palindrome_1:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
letter=input()
def isKaibun(s):
  res = True
  for i in range(int((len(s))/2)):
    if s[i] != s[-1-i]:
      res = False
      break
  return res
if isKaibun(letter[0:int((len(letter)-1)/2)]):
  if isKaibun(letter[int((len(letter)+3)/2-1):]):
    if isKaibun(letter):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

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

	return True

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

Solution (Python):
S=input()
def kai(s):
    if len(s)%2 == 0:
        if s[:int(len(s)/2)] == ''.join(list(reversed(s[int(len(s)/2):]))):
            return True
        else:
            return False

    else:
        if s[:int((len(s)-1)/2)] == ''.join(list(reversed(s[int((len(s)+1)/2):]))):
            return True
        else:
            return False

S1 = S[:int((len(S)-1)/2)]
S2 = S[int((len(S)+1)/2):]
if kai(S) & kai(S1) & kai(S2):
    print('Yes')
else:
    print('No')

Solution (Python):
s  = input()

n = len(s)

a = s[:n-1//2]
b = a[::-1]

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

for i in range(len(s)):
    if s[i] ==s[-i-1] and a  == b and x == y:
        print('Yes')
        break

else:print('No')

Solution (Python):
S=input()
N=len(S)
ans="Yes"
for i in range(N):
    if S[i]!=S[-i-1]:
        ans="No"

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

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

print(ans)

Solution (Python):
def kaibun(sl):
	f = 'Yes'
	for i in range(len(sl)):
		if sl[i] != sl[-1-i]:
			f = 'No'
			break
	return f


s = input()



sl = []
slz = []
slk = []

for i in range(len(s)):
    sl.append(s[i])

for i in range((len(s)-1) // 2):
    slz.append(s[i])


for i in range(((len(s)+3)//2), len(s)+1):
    slk.append(s[i-1])


f = 'Yes'
    
    
if kaibun(sl) == 'No':
	f = 'No'

if kaibun(slz) == 'No':
	f = 'No'

if kaibun(slk) == 'No':
	f = 'No'

print(f)

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

for i in range(N // 2):
    if S[i] == S[i * (-1) - 1]:
        continue
    else:
        print("No")
        sys.exit()
for i in range(N // 4):
    index = int(i * (-1) - 1 - (N-1)/2 - 1)
    if S[i] == S[index]:
        continue
    else:
        print("No")
        sys.exit()
for i in range(N // 4):
    index = int(i + (N+3)/2-1)
    if S[index] == S[i * (-1) - 1]:
        continue
    else:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
A = list(input())
for i in range(len(A)//2):
  if A[i] == A[len(A)-i-1]:
    continue
  else:
    print('No')
    exit()
for k in range(len(A)//2//2):
  if A[k] == A[(len(A)-1)//2-k-1]:
    continue
  else:
    print('No')
    exit()
for l in range(len(A)//2//2):
  if A[(len(A)+3)//2+l-1] == A[len(A)-l-1]:
    continue
  else:
    print('Notice')
    exit()
print('Yes')

Solution (Python):
S0 = input()
N = len(S0)
S1 = S0[:(N - 1) // 2]
S2 = S0[((N + 3) // 2) - 1:]

def isPal(a):
    if(len(a) % 2 == 0):
        l = len(a) // 2
    else:
        l = (len(a) - 1) // 2

    for i in range(l):
        if (a[i-1] != a[-i]):
            return False

    return True

if (isPal(S0) and isPal(S1) and isPal(S2)):
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
sum="Yes"
kai=len(S)
unk=(int(kai)-1)/2
unk1=(int(kai)+3)/2
A=S[0:int(unk)]
B=S[int(unk1-1):int(kai)]

for i in range(kai//2):
  if S[i]!=S[-i-1]:
    sum="No"
for i in range(len(A)):
  if A[i]!=A[-i-1]:
    sum="No"
for i in range(len(B)):
  if B[i]!=B[-i-1]:
    sum="No"
print(sum)

Solution (Python):


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

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

if is_kaibun(S) == False:
    print('No')
elif is_kaibun(left) == False:
    print('No')
elif is_kaibun(right) == False:
    print('No')
else:
    print('Yes')

Solution (Python):
s=list(input())
n=len(s)
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]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):

def main():
    char_s = input()

    char_len = len(char_s)
    char_first = char_s[0:int((char_len-1)/2)]
    char_second = char_s[int((char_len+3)/2-1):char_len]

    flg_a = is_kaibun(char_s)
    flg_b = is_kaibun(char_first)
    flg_c = is_kaibun(char_second)

    if (flg_a==1) & (flg_b==1) & (flg_c==1):
        print('Yes')
    else:
        print('No')

def is_kaibun(str):

    strlen = len(str)
    for k in range(int(strlen/2)):
        if str[k] == str[strlen-k-1]:
            continue
        else:
            return 0

    return 1

if __name__ == '__main__':
    main()

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()
N = len(S)
N1 = int(((N-1)/2)-1)
N2 = int(((N + 3)/2)-1)
A = S[:N1+1]
B = S[N2:]
BB = B[::-1]
C = 0
n = len(A)
nn = int(n/2)
nnn = int((n-1)/2)

if A == BB:
  C += 1
  
if n%2 == 0:
  AA = A[nn:]
  if A[:nn] == AA[::-1]:
    C += 1
elif n%2 ==1:
  AAA = A[nnn+1:]
  if A[:nnn] == AAA[::-1]:
    C += 1
    
if C == 2:
  print('Yes')
else:
  print('No')

Solution (Python):
a = str(input())
b =len(a)
c = (b-1)/2
d = (b+3)/2
E = list(a)
R = list(reversed(E))
F = "".join(R)
A = list(a[0:int(c)])
X = list(reversed(A))
S = "".join(X)
B = list(a[int(d-1):int(b+1)])
Y = list(reversed(B))
Q = "".join(Y)
if a[0:int(c)] == S and a[int(d-1):int(b+1)] == Q and a == F :
    print('Yes')
else:
    print('No')

Solution (Python):
S = list(input())
N = len(S)
halfS = int((N-1)/2)
rev_S = list(reversed(S))


S__1 = ''.join(S)
S__2 = ''.join(rev_S)
if S__1 == S__2:
    T = S[0:halfS]
    rev_T = list(reversed(T))
    T__1 = ''.join(T)
    T__2 = ''.join(rev_T)
    if T__1 == T__2:
        U = rev_S[0:halfS]
        rev_U = list(reversed(U))
        U__1 = ''.join(U)
        U__2 = ''.join(rev_U)
        if U__1 == U__2:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

else:
    print("No")

Solution (Python):

s=input()
n=len(s)




n=n//2
for i in range(int(n//2)+1):
    if s[i]==s[-1-i]:
        pass
    else:
        print('No')
        exit()
f=''
e=''
f=s[:n]
e=s[-n:]

for i in range(int(n//2)+1):
    if f[i]==f[-1-i]:
        pass
    else:
        print('No')
        exit()
    if e[i]==e[-i-1]:
        pass
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
def is_palindrome(s):
    h = len(s) // 2
    if len(s) % 2 == 0:
        if s[:h] == s[:h-1:-1]:
            return True
    else:
        if s[:h] == s[len(s):h:-1]:
            return True

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

Solution (Python):
S = input()
n = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 0:
    print("No")
else:
    s1 = S[0:n // 2]
    if kaibun(s1) == 1:
        print("Yes")
    else:
        print("No")

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

kaibun=input()

N=len(kaibun)
A=kaibun[0:int((N-1)/2)]
B=kaibun[int((N+3)/2-1):int(N)]


if palindrome(kaibun) & palindrome(A) & palindrome(B):
    print('Yes')
else:
    print('No')

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

Solution (Python):
s=input()
a=1
for i in range(len(s)):
  if(s[i]!=s[-i-1]):
    a=0
    break
for i in range((len(s)-1)//2):
  if(s[i]!=s[(len(s)-3)//2-i]):
    a=0
    break
if(a==1):
  print("Yes")
else:
  print("No")

Solution (Python):
def f(s):
  n=len(s)
  for i in range(int((n+1)/2)):
    if s[i]!=s[-(i+1)]: return False
  return True
S=input()
N=len(S)
if f(S) and f(S[0:int((N-1)/2)]) and f(S[int((N+3)/2)-1:N+1]):
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()
N = len(S)
str_num = -1
reverse_S = ''


for i in range(-1,-(N+1),-1):
  reverse_S = reverse_S + S[i]

if S == reverse_S:
  condition1 = 'YES'
else:
  condition1 = 'NO'


S2 = ''
N2 = int((N-1)/2)
for i in range(N2):
  S2 = S2 + S[i]
  
reverse_S2 = ''
for i in range(-1,-(N2+1),-1):
  reverse_S2 = reverse_S2 + S2[i]

if S2 == reverse_S2:
  condition2 = 'YES'
else:
  condition2 = 'NO'
  

S3 = ''
N3 = int((N+3)/2)
for i in range(N3-1,N):
  S3 = S3 + S[i]
  
  
reverse_S3 = ''
for i in range(-1,-(N3-1),-1):
  reverse_S3 = reverse_S3 + S3[i]
  
if S3 == reverse_S3:
  condition3 = 'YES'
else:
  condition3 = 'NO'

if condition1 == condition2 == condition3 == 'YES':
  print('Yes')
else:
  print('No')