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 numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import cmath as cma
import copy as cp
import sys
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

s = sinput()
n = len(s)

flag = 1
if s != s[::-1]: flag = 0
if s[:(n-1)//2] != s[:(n-1)//2][::-1]: flag = 0
if s[(n+3)//2-1:] != s[(n+3)//2-1:][::-1]: flag = 0


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

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

thresh_1 = int((len(s) - 1) / 2)
thresh_2 = int((len(s) + 3) / 2)

s_1 = s[:thresh_1]
s_2 = s[thresh_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)
def check(s):
  return "".join(reversed(s)) == s

if check(S) and check(S[:(N-1)//2]) and check(S[(N+1)//2:]):
  print("Yes")
else:
  print("No")

Solution (Python):

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

s = input()
s_len = len(s)
flag1 = isKaibun(s)
flag2 = isKaibun(s[:(s_len-1) // 2])
flag3 = isKaibun(s[(s_len+2) // 2:])
if flag1 and flag2 and flag3:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):

import sys

sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read


sys.setrecursionlimit(10**7)






def run():
    S = input()
    N = len(S)
    if S[:(N-1)//2] == S[:(N-1)//2][::-1] and S == S[::-1] and S[(N+3)//2-1:] == S[(N+3)//2-1:][::-1]:
        print('Yes')
    else:
        print('No')
if __name__ == "__main__":
    run()

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

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

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


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

Solution (Python):
S = input()
N = len(S)
a=S[0:int((N-1)/2)]
b=S[int((N+3)/2-1):int((N))]

c=list(a)
d=list(reversed(c))

e=list(b)
f=list(reversed(e))

if a==b and c==d and e==f:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()

n=len(s)

a=s[::-1]

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

maer=(mae[::-1])

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

ator=(ato[::-1])

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

else :
    print('No')

Solution (Python):
S = input()
N = len(S)
left = S[:int(N/2)]
right = S[int((N+2)/2):]

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

Solution (Python):
S = input()
N = len(S)
left = S[:int(N/2)]
right = S[int((N+2)/2):]
S_reversed = "".join(reversed(list(S)))
left_reversed = "".join(reversed(list(left)))
right_reversed = "".join(reversed(list(right)))

if S == S_reversed and left == left_reversed and right == right_reversed:
    print("Yes")
else:
    print("No")

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


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

Solution (Python):
s=input()
f=s[:(len(s)-1)//2]
l=s[(len(s)+3)//2-1:]
flag="Yes"
for i in range(len(s)//2):
    if s[i]==s[-i-1]:
        pass
    else:
        flag="No"
        break
if flag=="Yes":
    for j in range(len(f)//2):
        if f[j]==f[-j-1]:
            pass
        else:
            flag="No"
            break
if flag=="Yes":
    for x in range(len(l)//2):
        if l[x]==l[-x-1]:
            pass
        else:
            flag="No"
            break
print(flag)

Solution (Python):


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

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

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

Solution (Python):
st=input()
n=len(st)
if(n%2==0):
	print("No")
	exit(0)
if(st==st[::-1]):
	s1=""
	for i in range((n-1)//2):
		s1+=st[i]
	s2=""
	for i in range((n+3)//2-1,n):
		s2+=st[i]
	if(s1==s1[::-1] and s2==s2[::-1]):
		print("Yes")
	else:
		print("No")
else:
	print("No")

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

Solution (Python):
S = list(input())
n = len(S)
S1 = S[:(n-1)//2]
S2 = S[(n+3)//2-1:]
ans = "Yes"
for i in range(n//2):
	if S[i] != S[-(i+1)]:ans="No"
for i in range(len(S1)//2):
	if S1[i] != S1[-(i+1)]:ans="No"
for i in range(len(S2)//2):
	if S2[i] != S2[-(i+1)]:ans="No"
print(ans)

Solution (Python):
S = input()
N = len(S)
S_1 = []
S_2 = []

for i in range(int((N-1)/2)):
    S_1.append(S[i])

for j in range(int((N+3)/2-1), int(N)):
    S_2.append(S[j])

S_2.reverse

if S_1 == S_2 :
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
def isPalindrome(str):
    return str == str[::-1]

print('Yes' if isPalindrome(S) and isPalindrome(S[:N//2]) and isPalindrome(S[N//2+1:]) else 'No')

Solution (Python):
import sys
S = input()
if S != S[::-1]:
  print("No")
  sys.exit()
N = len(S)
SS = S[:(N - 1) // 2]
if SS != SS[::-1]:
  print("No")
  sys.exit()
SSS = S[(N + 3) // 2 - 1:]
if SSS != SSS[::-1]:
  print("No")
  sys.exit()
print("Yes")

Solution (Python):

s=input()
n=len(s)
first=int((n-1)/2)
last=int((n+3)/2)

rev_s=s[::-1]
s_first=s[:first]
s_last=s[last-1:]
rev_s_first=s_first[::-1]
rev_s_last=s_last[::-1]

for i in range(len(s_first)):
    if s_first[i]!=rev_s_first[i]:
        print("No")
        exit()

for i in range(len(s_last)):
    if s_last[i]!=rev_s_last[i]:
        print("No")
        exit()

for i in range(n):
    if s[i]!=rev_s[i]:
        print("No")
        exit()

print("Yes")

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

Sa = S[0:(N-1)//2]
Sb = S[(N+3)//2 -1:]



def parind(X):
  T = len(X)
  for i in range(T):
    if X[i] != X[T-i-1]:
      return False
  return True

print('Yes' if parind(S) and parind(Sa) and parind(Sb) else 'No')

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

    def checKPal(s):
        n = len(s)
        if n%2==0:
            if s[:int(n/2)] == s[:int(n/2)-1:-1]:
                return True
            else:
                return False
        else:
            if s[:int(n/2)] == s[:int(n/2):-1]:
                return True
            else:
                return False

    k1 = int((N-1)/2)
    k2 = int((N+3)/2)
    if checKPal(S) and checKPal(S[:k1]) and checKPal(S[k2-1:]):
        print("Yes")
    else:
        print("No")

main()

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

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

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



if S != S[::-1]:
    flag = False

SS = S[0:(N-1)//2]
if SS != SS[::-1]:
    flag = False

SS = S[(N+3)//2:-1]
if SS != SS[::-1]:
    flag = False

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

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

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

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

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

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

Solution (Python):
def string_palindrome(word):
	word_head = word[:(len(word)-1)//2]
	word_last = word[((len(word)+3)//2)-1:]
	if word != word[::-1]:
		return 'No'
	elif word_head == word_head[::-1] and word_last == word_last[::-1]:
		return 'Yes'
	else:
		return 'No'

print(string_palindrome(input()))

Solution (Python):
S = input()
N = len(S)
res = "No"

if S == S[::-1]:
    if S[:int((N-1)/2)] == S[:int((N-1)/2)][::-1]:
        if S[int((N+3)/2)-1:] == S[int((N+3)/2)-1:][::-1]:
            res = "Yes"

print(res)

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

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

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

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

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

Solution (Python):
def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 <= p2:
        if s[p1] != s[p2]:
            flag = False
        p1 += 1
        p2 += -1
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    
    
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

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

def solve(word, length):

    first = (length-1) // 2
    last = (length+3) // 2
    
    if isPalindrome(word) and isPalindrome(s[:first]) and isPalindrome(s[last-1:]):
        print("Yes")
    else:
        print("No")

def isPalindrome(word):
    palindrome = True
    size = len(word)
    start = 0
    end = size - 1

    while start <= end:
        if word[start] != word[end]:
            palindrome = False
            return palindrome
        
        start += 1
        end -= 1
    
    return palindrome

solve(s, length)

Solution (Python):
S = list(input())
list1 = S[0:int(((len(S)-1)/2))]
list2 = S[int(((len(S)+3)/2)-1):len(S)]
S_r = list(reversed(S))
list1_r = list(reversed(list1))
list2_r = list(reversed(list2))

if list1 == list1_r and list2 == list2_r and S == S_r:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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




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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def is_kaibun(_S):
    if len(_S)==1 or _S[:int((len(_S))/2)]==_S[int((len(_S)+1)/2):][::-1]:
        return True
    else:
        return False

def main():
    _S = S()
    is_tsuyoi1 = is_kaibun(_S)
    is_tsuyoi2 = is_kaibun(_S[:int((len(_S)-1)/2)])
    is_tsuyoi3 = is_kaibun(_S[int((len(_S)+1)/2):])
    print("Yes" if is_tsuyoi1 and is_tsuyoi2 and is_tsuyoi3 else "No")


main()

Solution (Python):
S = list(input())
N = len(S)
N2 = (N-1)//2
N3 = (N+3)//2
ans = 0
Sr = S[::-1]

if(S == Sr):
    ans = 1
    S2 = S[0:N2]
    S2r = S2[::-1]
    if(S2 == S2r):
        S3 = S[(N+3)//2-1:N]
        S3r = S3[::-1]
        if(S3 != S3r):
            ans = 0
    else :
        ans = 0
            
if(ans == 1):
    print('Yes')
else:
    print('No')

Solution (Python):
def palindrome(s):
    return s == "".join(list(reversed(s)))

S = input()
N = len(S)

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

Solution (Python):
s = input()
s_h = s[:(len(s)-1)//2]
s_h_b = s[(len(s)+3)//2-1:]

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

Solution (Python):
s = input()
t = True

if s == s[::-1]:
  if s[:(int)((len(s) - 1)/2)] == s[:(int)((len(s) - 1)/2):-1]:
    if s[(int)((len(s) + 3)/2 - 1):] == s[-1:len(s) - (int)((len(s) + 3)/2) + 1:-1]:
      print("Yes")
      t = False
if t:
  print("No")

Solution (Python):
s = input()
if s == s[::-1]:
    temp = s[0:int(((len(s) - 1) / 2))]
    if temp == temp[::-1]:
        temp = s[int(((len(s) + 3) / 2)) - 1:len(s)]
        if temp == temp[::-1]:
            print('Yes')
            exit()
print('No')

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

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

Solution (Python):
s=input()
n=len(s)
m=int((n-1)/2)
l=int((n+3)/2)
a=0

for i in range(n):
    if s[i]!=s[n-i-1]:
        a+=1


for i in range(m):
    if s[i]!=s[m-i-1]:
        a+=1


for i in range(l,n):
    if s[i]!=s[n-i-1]:
        a+=1

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

Solution (Python):
S=input()
N=len(S)
T=S[:N//2]
U=S[N//2+1:]

flg=0

for i in range(int((N-1)/2)):
  if(S[i]!=S[-i-1]):
    flg=1
    break
  
for j in range(len(T)//2):
  if(T[j]!=T[-j-1]):
    flg=1
    break
  
for k in range(len(U)//2):
  if(U[k]!=U[-k-1]):
    flg=1
    break

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

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

S = input()
flag = 0

if isKaibun(S):
  flag += 1
if isKaibun(S[:(len(S)-1)//2]):
  flag += 1
if isKaibun(S[(len(S)+3)//2-1:]):
  flag += 1

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

Solution (Python):
import numpy as np

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

ans = 'No'

if all(S == S_rev):
  temp_S = S[:(N-1)//2]
  temp_S_rev = temp_S[::-1]
  
  if all(temp_S == temp_S_rev):
    temp_S = S[(N+3)//2-1:]
    temp_S_rev = temp_S[::-1]
    
    if all(temp_S == temp_S_rev):
      ans = 'Yes'
print(ans)

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

n = len(s)


before = s[:math.floor(n/2)]
after = s[math.ceil(n/2):]
if before == after:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

def kaibun(s):
    if len(s) % 2 == 1:
        l = len(s) //2
        return s[:l] == s[:l:-1]
    else:
        l = len(s) //2
        return s[:l] == s[:l-1:-1]
n = len(s)

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

Solution (Python):
def main():
    import sys
    
    s = input()
    n = len(s)
    s_l = s[:int((n-1)/2)]
    s_r = s[int((n+1)/2):]
    if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

b = 0
for i in range(0,int((len(S)-1)/2)):
    if S[i] == S[len(S)-i-1]:
        b += 1

if len(S) > 3:
    if len(S)%4 == 1:
        c = 0
        for i in range(0,int((len(S)-1)/4)):
            if S[i] == S[int((len(S)-1)/2)-i-1]:
                c += 1
        d = 0
        for i in range(0,int((len(S)-1)/4)):
            if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
                d += 1
        if b == int((len(S)-1)/2) and c == int((len(S)-1)/4) and d == int((len(S)-1)/4):
            print('Yes')
        else:
            print('No')
    elif len(S)%4 == 3:
        c = 0
        for i in range(0,int((len(S)-3)/4)):
            if S[i] == S[int((len(S)-1)/2)-i-1]:
                c += 1
        d = 0
        for i in range(0,int((len(S)-3)/4)):
            if S[int((len(S)+3)/2)+i-1] == S[len(S)-i-1]:
                d += 1
        if b == int((len(S)-1)/2) and c == int((len(S)-3)/4) and d == int((len(S)-3)/4):
            print('Yes')
        else:
            print('No')
else:
    if S[0] == S[2]:
        print('Yes')
    else:
        print('No')

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

ans = 0
n = len(s)
s1 = list(reversed(s))
if s != s1:
    ans = 1

s2 = s[0:(n-1)//2]
s3 = list(reversed(s2))
if s2 != s3:
    ans = 1

s4 = s[(n+2)//2:n]
s5 = list(reversed(s4))
if s4 != s5:
    ans = 1

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

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.readline
    s = list(input()[:-1])
    N = len(s)
    if s != list(reversed(s)):
        print('No')
    elif s[0: (N - 1) // 2] != list(reversed(s[0: (N - 1) // 2])):
        print('No')
    elif s[(N + 1) // 2:N] != list(reversed(s[(N + 1) // 2:N])):
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

S = input()

allS = isPalindrome(S)
formerS = isPalindrome(S[:len(S)//2])
latterS = isPalindrome(S[len(S)//2+1:])

if allS and formerS and latterS:
    print("Yes")
else:
    print("No")

Solution (Python):
from itertools import *

def main():
    N = input()
    
    
    
    
    if N != N[::-1]:
        print("No")
    elif N[:(len(N)-1)//2] != N[:(len(N)-1)//2][::-1]:
        print("No")
    elif N[(len(N)+3)//2:-1] != N[(len(N)+3)//2:-1][::-1]:
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()

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

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

def check(c):
    if len(c) == 0:
        return False
    if list(c) == list(reversed(c)):
        return True
    return False

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

Solution (Python):

s=input()
flag=True
n=len(s)
if s!=s[::-1]:
    flag=False
if s[:(n-1)//2]!="".join(list(reversed(s[:(n-1)//2]))):
    flag=False
if s[(n+3)//2-1:]!="".join(list(reversed(s[(n+3)//2-1:]))):
    flag=False
print("Yes" if flag else "No")

Solution (Python):
s=list(input())
n=len(s)
for ii in range(n//2):
  if s[ii]!=s[n-ii-1]:
    print("No")
    exit()
ss=s[0:n//2]

nn=len(ss)
for ii in range(nn//2):
  if ss[ii]!=ss[nn-ii-1]:
    print("No")
    exit()
ss=s[(n+3)//2-1:n]

nn=len(ss)
for ii in range(nn//2):
  if ss[ii]!=ss[nn-ii-1]:
    print("No")
    exit()
print("Yes")

Solution (Python):
S = input()
N = len(S)
S1 = S[:N//2]
S2 = S[N//2 + 1:]
if S1 != S2:
    print('No')
    exit()
for i in range(N//4):
    if S1[i] != S1[-i - 1]:
        print('No')
        exit()
print('Yes')

Solution (Python):
S = input()
N = len(S)
S1 = S[:N//2]
S2 = S[N//2 + 1:]
N1 = len(S1)
if S1 != S2:
    print('No')
    exit()

for i in range(N//4):
    if S1[i] != S1[-i - 1]:
        print('No')
        exit()
print('Yes')

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

Solution (Python):
S=input()

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

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

n = len( s )
s_l = s[:(n-1)//2]
s_r = s[(n+1)//2:]

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s1 = list(input())
    rev1 = s1[::-1]
    n = len(s1)
    s2 = s1[0:(n-1)//2]
    rev2 = s2[::-1]
    s3 = s1[(n+3)//2-1:n]
    rev3 = s3[::-1]
    if s1 == rev1 and s2 == rev2 and s3 == rev3:
        print("Yes")
    else:
        print("No")

    return


if __name__ == "__main__":
    solve()

Solution (Python):
S = input()
N = len(S)
S1 = S[:int((N-1)/2)]
S2 = S[int((N+1)/2) : N]
l = [S, S1, S2]
ans = 'Yes'

for s in l:
  for i in range(len(s)):
    a = s[i]
    b = s[-(i+1)]
    if a != b:
      ans = 'No'

print(ans)

Solution (Python):
def f(s):
    n =len(s)
    t = list(s)
    lower = t[:(n-1) // 2]
    upper = t[(n+1) // 2:]
    print('Yes' if t == t[::-1] and lower == lower[::-1] and upper == upper[::-1] else "No")

s = input()
f(s)

Solution (Python):
S = input()

N = len(S)
s = S[::-1]
a = S[:((N-1)//2)]
b = S[((N+3)//2)-1:]
c = a[::-1]
d = b[::-1]

if (S == s and a == c):
    if(b == d):
        print('Yes')
    else:
        print('No')
else:
    print('No')

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


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

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

Solution (Python):
s = input()
S = list(s)
cnt = 0
l = int(len(s))
l = l // 2
for i in range(l + 1):
    if S[i] == S[-(1 + i)]:
        for j in range(l):
            if S[j] == S[-(l + 2 + j)]:
                cnt += 1


if cnt == l * (l + 1):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
S2 = S[::-1]
if(S != S2):
  print('No')
else:
  N = len(S)
  sl = S[:(N-1)//2]
  sr = S[(N+1)//2:]
  sl2 = sl[::-1]
  sr2 = sr[::-1]
  if(sl == sl2 and sr == sr2):
    print('Yes')
  else:
    print('No')

Solution (Python):
str=input()

N=len(str)

def kaibun(STR):
  n=len(STR)
  for i in range(int((n+1)/2)):
    if STR[i]==STR[n-1-i]:
      pass
    else:
      return False
  return True

if(kaibun(str) and kaibun(str[0:int((N-1)/2)]) and kaibun(str[int((N+3/2)-1):N-1])):
    print("Yes")
else:
    print("No")

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()

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

mid = (len(S)-1) // 2
bl = check(S) and check(S[:mid]) and check(S[mid+1:])

print('Yes' if bl else 'No')

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()

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

bl = True
if not check(S):
    bl = False
mid = (len(S)-1) // 2
if not check(S[:mid]):
    bl = False
if not check(S[mid+1:]):
    bl = False

print('Yes' if bl else 'No')

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

n2 = (n - 1) // 2
for i in range(n2):
    if s[i] != s[n2-i-1]:
        flag = False

n3 = (n + 3) // 2 - 1

for i in range(n3,n):
    if s[i] != s[n-i-1]:
        flag = False

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

Solution (Python):
S = list(input())
S_rev = list(reversed(S))
S_min = list(S[:(len(S) - 1) // 2])
S_min_rev = list(reversed(S_min))


if S == S_rev and S_min == S_min_rev:
    print('Yes')
else:
    print('No')

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

def isKaibun(x):
    if x == x[::-1]:
        return True
    else:
        return False

ans = 'Yes'

if not isKaibun(s):
    ans = 'No'
if not isKaibun(s[:(n-2)//2+1]):
    ans = 'No'
if not isKaibun(s[(n+2)//2:]):
    ans = 'No'

print(ans)

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

Solution (Python):
def isp(s):
    t=s[::-1]
    if s==t:
        return 1
    return 0

s=input()
n=len(s)

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

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

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

Solution (Python):
if __name__ == "__main__":
    s = input()
    ans = True

    for i in range((len(s) - 1) // 2):
        if s[0 + i] != s[(len(s) - 1) // 2 - i - 1] or s[(len(s) + 3) // 2 + i - 1] != s[len(s) - i - 1] or s[0 + i] != s[len(s) - i - 1]:
            ans = False
    if ans:
        print("Yes")
    else:
        print("No")

Solution (Python):
S = input()

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

Solution (Python):
s = input()

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

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

Solution (Python):
s = input()
rs= s[::-1]
a = s[:(len(s))//2]
ra = a[::-1]
b = s[(len(s)+2)//2:]
rb = a[::-1]

if s==rs and a==ra and b==rb:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
s = list(input())
n = len(s); flag= 0
if s == s[::-1]:    flag += 1 ;
start, end = 0, ((n-1)//2)-1
while(end > start and flag == 1):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
start, end = (n+3)//2 -1, (n-1)
while(end > start and flag == 2):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
print('Yes' if flag == 3 else 'No')

Solution (Python):
S = input()
left = S[0:(len(S)-1)//2]
right = S[(len(S)+3)//2 - 1: len(S)]

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

if kaibun(S) and kaibun(left) and kaibun(right):
    print('Yes')
else:
    print('No')

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

Solution (Python):
import sys
import math

S = input()
N = len(S)

flag = 0


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

if N ==3 or N==4:
    print("Yes")
    sys.exit()


for i in range(N//4):
    if S[i] != S[N//2-1-i]:
        print("No")
        sys.exit()
    if S[math.ceil(N/2)+i] != S[N-1-i]:
        print("No")
        sys.exit()

print("Yes")

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

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

for i in range(n):
    if s[i] != s[n-1-i]:
        is_ok = False

end = (n-1)//2
for i in range(end):
    if s[i] != s[end-1-i]:
        is_ok = False

sta = (n+3)//2
for i in range(sta,n):
    if s[i] != s[n-1-i]:
        is_ok = False

if is_ok:
    print("Yes")
else:
    print("No")

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

Solution (Python):
def strongPalindrome(S):
    S2 = S[0:(len(S)-1)//2]
    S3 = S[(len(S)+3-1)//2:]
    return "Yes" if S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1] else "No"

S = input()
print(strongPalindrome(S))

Solution (Python):
def kaibun(x):
    if x == x[::-1]:
        return True
    return False


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

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


def is_rev(s):
    return tuple(s) == tuple(reversed(s))


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

Solution (Python):

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

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

Solution (Python):
s = input()
n = len(s)
c = 1
for i in range((n-1)//2):
    c = -c if s[i]==s[n-i-1] else 0

for j in range((n-1)//4):
    c = -c if s[j]==s[(n-1)//2-j-1] else 0

print('No' if c == 0 else 'Yes')

Solution (Python):
s = input()
n = len(s)
sf = s[0:(n-1)//2]
sr = s[::-1][0:(n-1)//2]
print('YNeos'[not(s == s[::-1] and sf == sf[::-1] and sr == sr[::-1])::2])

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

Solution (Python):
def check(c):
    f = False
    for i,s in enumerate(c):
        if c[i] != c[-(i+1)]:
            break
        if len(c) % 2 == 0 and i == len(c) / 2:
            f = True
            break
        if len(c) % 2 == 1 and i == (len(c) - 1) / 2:
            f = True
            break
    return f

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

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