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)


def judge_kaibun(S):
    n = len(S)
    center = n//2
    return S[:center] == S[-center:][::-1]


if N == 3:
    if S[0] == S[2]:
        print("Yes")
    else:
        print("No")
    exit()

full_judge = judge_kaibun(S)
pre_judge = judge_kaibun(S[:(N-1)//2])
pos_judge = judge_kaibun(S[-(N-1)//2:])

if pre_judge and pos_judge and full_judge:
    print("Yes")
else:
    print("No")

Solution (Python):
import math

S=input()

if S[0:math.floor((len(S)/2))] == S[math.floor((len(S)/2))+1:len(S)]:
    p = S[0:math.floor((len(S)/2))]
    q = S[math.floor((len(S)/2))+1:len(S)]
    if p == p[len(p)::-1]:
        if q == q[len(q)::-1]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

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

def is_kaibunn(s):
    n = len(s)
    if n==2:
        return False
    a = ""
    b = ""
    for i in range(int((n-1)/2)):
        a += s[i]
        b += s[n-i-1]
    if a==b:
        return True
    else:
        return False

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

Solution (Python):
X=input()
L=X[::-1]
N=len(X)
if N % 2 == 1:
    if L==X:
        a=int((N-1)/2)
        b=int((N+3)/2)
        Ya=X[0:a]
        LYa=Ya[::-1]
        Yb=X[b-1:N]
        LYb=Yb[::-1]
        if LYa ==Ya and LYb == Yb:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

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

Solution (Python):
import math

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

if __name__ == "__main__":
    S = input()
    N = len(S)
    s1 = S[:math.floor((N-1)/2)]
    
    s2 = S[math.ceil((N+3)/2)-1:]
    

    if ispalindrome(S) and ispalindrome(s1) and ispalindrome(s2) :
        ret = "Yes"
    else:
        ret = "No"
    print(ret)

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import math
import itertools
import string
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7


def inp(): return int(sys.stdin.readline())


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


def inpl_str(): return list(sys.stdin.readline().split())


S = input()
N = len(S)
LS = S[:(N-1)//2]
RS = S[(N+1)//2:]

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

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

ss = s[:int((n-1)/2)]
sss = s[int((n+1)/2):]

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

Solution (Python):

s = input()
slist = list(s)
n = len(slist)
ans = 'Yes'

for i in range(int((n-1)/2)):
  if slist[i] != slist[n-1-i] or slist[i] != slist[int((n-1)/2-1-i)] or slist[int((n+3)/2-1+i)] != slist[n-1-i]:
    ans = 'No'
print(ans)

Solution (Python):
moji=list(input())
for i in range(len(moji)//2):
    if moji[i] != moji[-i-1]:
        print("No")
        exit()
mojia=[]
mojib=[]
count=0
for i in moji:
    if count < len(moji)//2:
        mojia.append(i)
    if count > len(moji)//2:
        mojib.append(i)
    count = count+1
for i in range(len(mojia)//2):
    if mojia[i] != mojia[-i-1]:
        print("No")
        exit()
for i in range(len(mojib)//2):
    if mojib[i] != mojib[-i-1]:
        print("No")
        exit()
print("Yes")

Solution (Python):

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)


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


s=input()
N=len(s)
l=int((N-1)/2 -1)

r=l+2

if is_kaibun(s) and is_kaibun(s[:(l+1)]) and is_kaibun(s[r:]):
    print("Yes")
else:
    print("No")

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

Solution (Python):

s = input()

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



if s != s[::-1] or s[:f] != s[:f:-1] or s[b:] != s[b:][::-1]: 
  
  print("No")
else: 
  print("Yes")

Solution (Python):
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  
  if not S[i] == S[-1-i]:
    f = 1
    print('No')
    break

if f == 0:
  s = S[:int((len(S)-1)/2)]
  for i in range(int(len(s)//2)):
    if not s[i] == s[-1-i]:
      f = 1
      print('No')
      break

if f == 0:
  s = S[int((len(S)+3)/2-1):]
  for i in range(int(len(s)//2)):
    
    if not s[i] == s[-1-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

Solution (Python):
S=str(input())
N=len(S)
p=0
a=0
c=0
for i in range(int((N-1)/2)):
        if S[i]==S[-i-1]:
            p+=1
if p==(N-1)/2:
    for i in range(int((N-1)/4)):
        T=S[:int((N-1)/2)]
        if T[i]==T[-i-1]:
                a+=1
    if a==int((N-1)/4):
        for y in range(int((N-(N+3)/2)/2)):
            F=S[int((N+3)/2)-1:]
            if F[y]==F[-y-1]:
                c+=1
        if c==(int((N-(N+3)/2)/2)):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
import sys
s =input()
n = len(s)
hn = int((n-1)/2)
qn = int((n+1)/4)
for i in range(qn):
  if s[i] == s[hn-i-1] and s[-i-1] == s[i-hn] and s[i] == s[-i-1]:
    pass
  else:
    print("No")
    sys.exit()
print("Yes")

Solution (Python):
s = input()
if s == s[::-1]:
    flag = True
else:
    flag = False
N = len(s)
if flag:
    new = s[0:int((N-1)/2)]
    if new == new[::-1]:
        flag = True
    else: flag = False

if flag:
    new = s[int((N+2)/2):N]
    if new == new[::-1]:
        flag = True
    else:
        flag = False

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

Solution (Python):
S = input()
N = len(S)
haba1 = int((N-1)/2)
haba2 = int((N+3)/2)
con1 = ""
con2 = ""
for i in range(0,haba1):
    con1 += S[i]
for i in range(haba2-1,N):
    con2 += S[i]
if S[::-1] != S :
    print("No")
elif con1[::-1] != con1 :
    print("No")
elif con2[::-1] != con2 :
    print("No")
else :
    print("Yes")

Solution (Python):

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

def main():
    s = input()
    l = len(s)
    s1 = s[:l // 2]
    s2 = s[l // 2 + 1:]

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

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
N = len(S)
M = (N-1)/2
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return "No"
    return "Yes"

if is_kaibun(S)=="Yes":
    S = S[:int(M)]
    print(is_kaibun(S))
else:
    print("No")

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

Solution (Python):
s = input()
n = len(s)
ans = "Yes"
half = int((n -1) / 2)
half2 = int((n+2)/2)
a = s[:half]
a_2 = s[half+1:n]
a_2 = a_2[::-1]
if a != a_2:
    ans = "No"
else:
    if (len(a)%2) == 0:
        a_half = int(len(a)/2)
        a_3 = a[0:a_half]
        a_4 = a[a_half:len(a)]
        a_4 = a_4[::-1]
    else:
        a_half = int((len(a)+1)/2)
        a_3 = a[0:a_half]
        a_4 = a[a_half-1:len(a)]
        a_4 = a_4[::-1]
    if a_3 != a_4:
        ans = "No"
    else:
        b = s[half2:n]
        if (len(b)%2) == 0:
            b_half = int(len(b)/2)
            b_2 = b[0:b_half]
            b_3 = b[b_half:len(b)]
            b_3 = b_3[::-1]
        else:
            b_half = int((len(b)+1)/2)
            b_2 = b[0:b_half]
            b_3 = b[b_half-1:len(b)]
            b_3 = b_3[::-1]            
        if b_2 != b_3:
            ans = "No"
print(ans)

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

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

if ispalindrome(s)==1:
    if ispalindrome(s[:(n-1)//2])==1:
        if ispalindrome(s[(n+2)//2:])==1:
            print("Yes")
            exit()
print("No")

Solution (Python):
S = input()

N = len(S)
k = (N - 1) // 2
ans = True
for i in range(k // 2 + 1):
    if S[i] == S[k - 1 - i] == S[k + 1 + i] == S[2 * k - i]:
        continue
    ans = False
    break
if N == 3 and S[0] != S[2]:
    ans = False
print('Yes' if ans else 'No')

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


a = ""
b = ""

if len(s2) %2 == 1:
  a = s2[:int((n2-1)/2)]
  b = s2[int(int((n2-1)/2) + 1):]
else:
  a = s2[:int((n2)/2)]
  b = s2[int(int((n2)/2)):]





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

Solution (Python):
s = input()
if s == s[::-1]:
    flag = True
else:
    flag = False
N = len(s)
if flag:
    new = s[0:int((N-1)/2)]
    if new == new[::-1]:
        flag = True
    else: flag = False

if flag:
    new = s[int((N+2)/2):N]
    if new == new[::-1]:
        flag = True
    else:
        flag = False

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

Solution (Python):

def solve():
    S = input()
    s1 = S[:int((len(S)-1)/2)]
    s2 = S[int((len(S)+1)/2):]

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

    if s1 == s2:
        print("Yes")
    else:
        print("No")

solve()

Solution (Python):
S = input()
N = len(S) - 1
n = int(N / 2)

for i in range(0, n):
  if S[i] != S[N - i]:
    print('No')
    exit()
  if i < n // 2:
    if S[i] != S[int((N / 2) - 1) - i]:
      print('No')
      exit()
    if S[int((N + 4) / 2) - 1 + i] != S[N - i]:
      print('No')
      exit()
print('Yes')

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

first_s = s[:int((l - 1) / 2)]
second_s = s[int((l - 1) / 2 + 1):]


def isPalindrome(s):
    for i in range(int((l - 1) / 2)):
        if s[i] != s[-(i + 1)]:
            return False

    return True


if isPalindrome(s) and isPalindrome(first_s) and isPalindrome(second_s):
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
cnt=0

L=int((len(S)-1)/2)


for i in range(L):
    
    
    if S[i]==S[-(i+1)]:
        cnt+=1

if cnt!=L:
    print('No')
    exit()

S=S[0:L]


cnt=0
LEN=len(S)
for i in range(LEN):
    if S[i] == S[LEN-(i+1)]:
        cnt+=1

if cnt==LEN:
    print('Yes')
else:
    print('No')

Solution (Python):

S = input()
n = len(S)
a = list(S)
reva = a[n::-1]
sub1 = a[0:(int((n-1)/2))]
sub2 = a[int((n+3)/2-1):]
if a == reva and sub1 == sub1[len(sub1)::-1] and sub2 == sub2[len(sub2)::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
n=len(s)
ans = 'No'

if s==s[::-1]:
    if s[0:(n-1)//2] == ''.join(list(reversed(s[0:(n-1)//2]))):
        if s[(n+1)//2:n] == s[0:(n-1)//2]:
            ans= 'Yes'

print(ans)

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



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

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

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

Solution (Python):
s = input()
n = len(s)
a = int((n-1)/2)
b = int((n+3)/2)-1
sr = s[::-1]
c1 = s[0:a]
c1r = c1[::-1]
c2 = s[b:n]
c2r = c2[::-1]
if s == sr and c1 == c1r and c2 == c2r:
  print("Yes")
else:
  print("No")

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

N = int(len(S))
num = 0

for i in range(int((N-1)/2)):
    if S[i] == S[int((N-1)/2-1-i)]:
        pass
    else:
        num += 1

for j in range(int((N-1)/2)):
    if S[int((N-1)/2+1+j)] == S[int(N-1-j)]:
        pass
    else:
        num += 1

for k in range(int(N)):
    if S[k] == S[N-k-1]:
        pass
    else:
        num += 1


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

Solution (Python):
def isKaibun(s):
  for a, b in zip(s, reversed(s)):
    if a != b:
      return False
  return True

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

Solution (Python):
import math

def checkKaibun(s):
    ret = True
    length = len(s)
    for i in range(math.floor(length / 2)):
        if s[i] != s[length-1-i]:
            return False
    return ret

s = input()
ret1 = checkKaibun(s)


length = len(s)
s2 = s[0:(int)((length-1)/2)]

ret2 = checkKaibun(s2)


s3 = s[(int)((length+1)/2):length]

ret3 = checkKaibun(s3)


ret = "No"
if (ret1 and ret2 and ret3):
    ret = "Yes"
print("{}".format(ret))

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

res='Yes'
N=len(S)

def ispalindrome(s):
    h = len(s) // 2
    if (len(s)==2) & (h==1):
        if s[0]==s[1]:
            return 1
        else: return 0
    else:
        for a, b in zip(s[:h], reversed(s[h+1:])):
            if a != b: return 0
        return 1
    
if ispalindrome(S)==0:
    res='No'
else:
    for i in range(N):
        s1=S[0:(N-1)//2]
        s2=S[(N+2)//2:N]
        if (ispalindrome(s1)==0):
            res='No'
        if (ispalindrome(s2)==0):
            res='No'
print(res)

Solution (Python):
S=input()
N=len(S)
flag=0
for i in range(N//2):
  if S[i]==S[N-i-1]:
    continue
  else:
    flag=1
s1=S[0:(N-1)//2]
s1l=len(s1)

s2=S[(N+3)//2-1:N]
s2l=len(s2)

if flag!=1:
  for i in range(s1l//2):
    if s1[i]==s1[s1l-i-1]:
      continue
    else:
      flag=1
      break

if flag!=1:
  for i in range(s2l//2):
    if s2[i]==s2[s2l-i-1]:
      continue
    else:
      flag=1
      break

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

else:
  print("No")

Solution (Python):
S = input()
L = len(S)
a = int((L - 1) / 2)
b = int((L+3)/2)
S_first = S[:a]
S_second = S[(b-1):]
if S_first == S_second[::-1]:
    L_2 = len(S_first)
    if L_2 % 2 == 1:  
        a_2 = int((L_2 - 1) / 2)
        b_2 = int((L_2 + 3) / 2)
        S_first_f = S_first[:a_2]
        S_first_s = S_first[(b_2 - 1):]
        if S_first_f == S_first_s[::-1]:
            print('Yes')
        else:
            print('No')
    else:  
        a_2 = int(L_2 / 2)
        b_2 = int((L_2 + 1) / 2)
        S_first_f = S_first[: a_2]
        S_first_s = S_first[(b_2):]
        if S_first_f == S_first_s[::-1]:
            print('Yes')
        else:
            print('No')
else:
    print('No')

Solution (Python):
import math
s = input()
a=s[::-1]
flag=0
n=len(s)
if s==a:
    a=s[0:math.ceil((n-1)/2)]
    b = a[::-1]
    if a == b:
        a = s[math.ceil((n+3)/2-1):n]
        b = a[::-1]
        if a == b:
            flag=1
if flag==0:
    print('No')
else:
    print('Yes')

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

a=S[slice(0,int((N-1)/2))]

b=a[::-1]

if b==S[slice(int((N+1)/2),N+1)] and a==b:
    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):
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()
num = int(len(S))

N = int((num - 1) / 2)
M = int((num + 3) / 2)

first = S[0:N]
second = S[M - 1:M+N]
if first == second:
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin

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


def main():
    S = (stdin.readline()).replace('\n', '')
    N = len(S)

    if len(S) % 2 == 0:
        print('No')
        return

    
    if not is_kaibun(S): return

    

    for c in [S[0:N // 2], S[N // 2 + 1:]]:
        if not is_kaibun(c): return

    
    print("Yes")


if __name__ == "__main__":
    main()

Solution (Python):
def reverse(s):
    return s[::-1]
a=str(input())
b=reverse(a)
n=len(a)
c=a[:(n-1)//2]
d=reverse(c)
e=a[(n+3)//2-1:n]
f=reverse(e)

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

Solution (Python):
s=input()
lo=len(s)
p=[]
m=[]
c=0
q=(lo-1)//2
a=[]
b=[]
if(s.islower() and lo%2==1):
    l=[]
    l=list(s)
    ll=l[::-1]
    if(l==ll):
        c=c+1
    p=l[0:q]
    m=p[::-1]
    if(p==m):
        c=c+1
    a=l[(lo+3)//2-1:lo]
    
    b=a[::-1]
    if(a==b):
        c=c+1
if(c==3):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
S = input()
half_idx = (len(S)-1)//2
half = S[0:half_idx]
for i in range(half_idx-1):
    if half[i] != half[-1-i]:
        print("No")
        sys.exit()
    
for i in range((len(S)+1)-(len(S)+3)//2):
    if S[i] != S[-1-i]:
        print("No")
        sys.exit()
print('Yes')

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

def isKaibun(src):
  rev = src[:]
  rev.reverse()

  return src == rev


N = len(str)

def num(N):
  return N-1

s1 = num(1)
e1 = (num(N)-1) // 2 + 1
s2 = (num(N) + 3) // 2
e2 = num(N) + 1

if isKaibun(str) and isKaibun(str[s1:e1]) and isKaibun(str[s2:e2]):
  print('Yes')
else:
  print('No')

Solution (Python):

def ispalindrome(s):
    h = len(s)
    if (h % 2) == 0:
        h = int(h/2)
        for a, b in zip(s[:h], reversed(s[h:])):
            if a != b: return 0
    else:
        h = int(h/2)
        for a, b in zip(s[:h], reversed(s[h+1:])):
            if a != b: return 0
    return 1

str_in = input()
N = len(str_in)
result = ispalindrome(str_in)

if result == 0:
    print('No')
else:
    if N == 3:
        print('Yes')
    else:
        str_half = str_in[:int((N-1)/2)]
        result &= ispalindrome(str_half)

        if result == 0:
            print('No')
        else:
            str_half = str_in[int(((N+3)/2)-1):]
            result &= ispalindrome(str_half)

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

Solution (Python):
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))

from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

s = input()
ans = 'No'
n = len(s)
def isPalindrome(s):
    return s == s[::-1]

if isPalindrome(s) and isPalindrome(s[: n // 2]) and isPalindrome(s[(n // 2 + 1): ]):
    ans = "Yes"
print(ans)

Solution (Python):
str_inp = list(input())
str_len = len(str_inp)
flag = "ok"
check1 = ""
check2 = ""
dummy1 = (str_len - 1) // 2
for j in range(dummy1):
  check1 = check1 + str_inp[j]

for i in range(dummy1//2):
  if check1[i] != check1[-i-1]:
    flag = "ng"
    
dummy2 = (str_len + 3) // 2
for k in range(dummy2-1,str_len):
  check2 = check2 + str_inp[k]

dummy_len = len(check2)
for l in range(dummy_len//2):
  if check2[l] != check2[-l-1]:
    flag = "ng"

if flag == "ok" and check1 == check2:
  print("Yes")
else:
  print("No")

Solution (Python):
x = str(input())
check1 = (len(x)-1)/2+1
check2= (len(x)+3)/2
check3 = (len(x)+1)
if x[0:int(check1)-1] == x[int(check2)-1:int(check3)]:
    print("Yes")
else:
    print("No")

Solution (Python):
org_str = input()
n = len(org_str)
if n%2 == 0:
    N = int(n/2-1)
else:
    N = int((n-1)/2)

org_str1 = org_str[0:(N)]
org_str2 = org_str[(N+1):n]

new_str_list = list(reversed(org_str))
new_str = org_str[::-1]

new_str1_list = list(reversed(org_str1))
new_str1 = org_str1[::-1]

new_str2_list = list(reversed(org_str2))
new_str2 = org_str2[::-1]


if org_str == new_str and org_str1 == new_str1 and org_str2 == new_str2:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
zen = s[:n // 2]

kou= s[n // 2 + 1:]

s_rev = s[::-1]

zen_rev = zen[::-1]
kou_rev = kou[::-1]

if s == s_rev and zen == zen_rev and kou == kou_rev:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
T = S[0:int((len(S)-1)/2)]
U = S[int((len(S)+3)/2):int(len(S)-1)]
if S == S[::-1] and T == T[::-1] and U == U[::-1]:
    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()
n = len(s)

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

if not j(s):
    print ("No")
    exit ()

if not j(s[0:((n-1)//2)]):
    print ("No")
    exit ()

if not j(s[((n+3)//2)-1::]):
    print ("No")
    exit ()

print ("Yes")

Solution (Python):
A = input()
E = int((len(A)-1)/2)
B = A[0:E]
C = A[int((len(A)+3)/2)-1:]
if A == A[::-1] and B == B[::-1] and C == C[::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
def check_str( ss ):
  sslen = len(ss)
  
  if( sslen %2 == 0 ): 
    return (ss[:sslen//2] == ss[sslen//2:][::-1])
  else:
  	return (ss[:sslen//2] == ss[sslen//2+1:][::-1])
  
s = input()

slen = len(s)

if( not check_str( s ) ):
  print( "No" )
else:



  s1 =  s[:slen//2]
  s2 = s[slen//2+1:]
  
  
  if( (not check_str( s1 )) or (not check_str( s2 )) ):
    print( "No" )
  else:
    print( "Yes" )

Solution (Python):

s = list(input())
n = len(s)
ans = "Yes"
x = (n-1)//2-1
y = (n+3)//2-1
n-=1
for i in range(x+1):
    if s[i] != s[n-i]:
        ans = "No"
        break
for j in range(x+1):
    if s[j] != s[x-j]:
        ans = "No"
        break
    if s[y+j] != s[n-j]:
        ans = "No"
        break
print(ans)

Solution (Python):
line = input().rstrip()
line_len = len(line)
line_reverse = list(reversed(line))
line_reverse = ''.join(line_reverse)

start = int((line_len -1) /2)
end = int((line_len + 3) / 2 - 1)

start_len = line[0:start]
end_len = line[end:(line_len)]


if line == line_reverse and start_len == end_len:
    print('Yes')
else:
    print('No')

Solution (Python):
s = str(input())
forward = int((len(s)-1)/2)
back = int((len(s)+3)/2 -1)
if s == ''.join(list(reversed(s))):
    if s[:forward] == ''.join(list(reversed(s[:forward]))):
        if s[back:] == ''.join(list(reversed(s[back:]))):
            print("Yes")
            exit()
print("No")

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

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

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

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

Solution (Python):
s = input()

res = 0
s
s[::-1]
if s == s[::-1]:
    res += 1

t = int((len(s)-1)/2)
tm = s[:t]
if tm == tm[::-1]:
    res += 1

u = int(((len(s) +3) / 2 )-1)
tm = s[u:]
if tm == tm[::-1]:
    res +=1

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

Solution (Python):
S=input().strip()
r_S = S[::-1]
a = S[:int(((len(S)-1)/2)):]
b = S[int(((len(S)+1)/2))::]
r_a = S[int(((len(S)-3)/2))::-1]
r_b = S[:int(((len(S)-1)/2)):-1]

if a == r_a and b == r_b and S == r_S:
    print("Yes")
else:
    print("No")

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

left_end = (N - 1)//2
right_start = (N + 3) //2 - 1

left_S = S[:left_end]
right_S = S[right_start:]

rev_left_S = left_S[::-1]
rev_right_S = right_S[::-1]

check_1 = False
if (left_S == rev_right_S):
  check_1 = True

check_2 = False
if (left_S == rev_left_S):
  check_2 = True

check_3 = False
if (right_S == rev_right_S):
  check_3 = True

result = 'Yes' if (check_1 and check_2 and check_3) else 'No'

print(result)

Solution (Python):
s = input()

n = int(len(s))

n1 = int ( (n - 1 ) / 2 )
n2 = int ( (n + 1 ) / 2 )

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

def if_kai( st ):
  ret = True
  nn = len(st)
  nn1 = int ( (nn - 1 ) / 2 )
  for i in range(nn1+1):
    if st[i] != st[nn-i-1] :
       ret = False
       break
  return ret      

if if_kai( s ) and if_kai( s1 ) and if_kai( s2 ) :
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()

def check_if_kaibun(string):
  
  if len(string) % 2 == 1:
    middle = int((len(string) - 1)  / 2)
    
    
    if (string[0:middle]) == (string[middle + 1:][::-1]):
      return True
    else:
      return False
  else:
    middle = int(len(string) / 2)
    if (string[0:middle]) == (string[middle:][::-1]):
      return True
    else:
      return False
    
a = int((len(S) - 1) / 2)
b = int((len(S) + 3) / 2)




if check_if_kaibun(S):
  
  if check_if_kaibun(S[0:a]):
    
    if check_if_kaibun(S[b-1:]):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Solution (Python):
from copy import copy

S = input()
Slist = []
par = []
rap = []

for s in S:
    Slist.append(s)

if len(Slist)==3:
    if Slist==list(reversed(Slist)):
        print("Yes")
    else:
        print("No")
else:
    par = copy(Slist)
    rap = copy(Slist)
    rap = list(reversed(rap))

    if par==rap:
        rap = []
        par = copy(Slist)
        par = par[:(len(par)-1)//2]
        rap = copy(par)
        rap = list(reversed(rap))

        if par==rap:
            rap = []
            par = copy(Slist)
            par = par[(len(par)+3)//2-1:]
            rap = copy(par)
            rap = list(reversed(rap))

            if par==rap:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")

Solution (Python):

s = input()
n = len(s)


o1 = True
for i in range(n):
    if(i != int(n/2) + 1):
        
        o1 = o1 and s[i] == s[n - i -1]


o2 = True
n2 = int((n - 1) / 2)
for i in range(n2):
    
    o2 = o2 and s[i] == s[n2 - i -1]
    

o3 = True
n3 = int((n + 3) / 2)
for i in range(n - n3):
    
    o3 = o3 and s[i + n3 -1] == s[n - i -1]



if(o1 and o2 and o3): 
    Ans = "Yes"
else:
    Ans = "No"


print(Ans)

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

Solution (Python):
s=input()
s=list(s)
n=len(s)
a=s[:(n-1)//2]
b=s[(n+2)//2:]
m=len(a)
yes=0
for i in range((n-1)//2):
    if s[i]==s[-(i+1)]:
        yes+=1
if n==3:
    if yes==1:
        print('Yes')
    else:
        print('No')
else:    
    if m%2==1:
        for i in range((m-1)//2):
            if a[i]==a[-(i+1)]:
                yes+=1
            if b[i]==b[-(i+1)]:
                yes+=1
    else:
       for i in range(m//2):
            if a[i]==a[-(i+1)]:
                yes+=1
            if b[i]==b[-(i+1)]:
                yes+=1
    if yes>=(m-1)+(n-1)//2:
        print('Yes')
    else:
        print('No')

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

for i in range((n-1)//2):
  if s[i] != s[n-1-i]:
    count = 1
    break

if count == 0:
  for i in range((n-1) // 2 // 2):
    if s[i] != s[(n-3) // 2 - i]:
      count = 1
      break
    elif s[(n+1)//2 + i] != s[n-1-i]:
      count = 1
      break
print("Yes" if count==0 else "No")

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

cnt=0

num=len(s)//2

a=s[:num]
b=s[num+1:]

num2=len(a)//2
if len(a)%2 ==1:
    c=a[:num2]
    d=a[num2+1:]
else:
    c=a[:num2]
    d=a[num2:]


num3=int((len(s)+3)/2-1)
s1=s[num3:]
num4=len(s1)//2
if len(s1)%2==1:
    e=s1[:num4]
    f=s1[num4+1:]
else:
    e=s1[:num4]
    f=s1[num4:]


if a==b[::-1]:
    cnt +=1

if c==d[::-1]:
    cnt +=1

if e==f[::-1]:
    cnt +=1

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

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

N=len(S)
i=0
r="No"

s=int((N-1)/2)
t=int((N+3)/2)

a=S[0:s]
b=S[t-1:N]

if(N==3 and S==S[::-1]):
  print("Yes")
elif(S==S[::-1] and a==(a[::-1]) and b==(b[::-1])):
  print("Yes")
else:
  print("No")

Solution (Python):
def judge(s):
    ok = True
    n = len(s)
    m = (n - 1) // 2
    if (n == 1):
        ok = True
    else:
        if (m == 0):
            ok = (s[0] == s[1])
        else:
            for i in range(m):
                if s[i] != s[(n-1)-i]:
                    ok = False
                    break
    return ok

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) and judge(sb)
    return ok

s = str(input())

if ((len(s) % 2 == 0) or (len(s) > 99) or (len(s) < 3)):
    print("No")
else:
    if strong_judge(s):
        print("Yes")
    else:
        print("No")

Solution (Python):
S = input()

N = len(S)

def func(S,ans,N):
    for i in range(N):
        if S[i] != S[N - i-1]:
            ans ='No'
    return (ans)

ans = func(S, 'Yes',(len(S)-1//2))
S1 = S[(N+3)//2-1:N]
ans = func(S1, ans,len(S1))

print(ans)

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

tmp_p = 0

tmp = ''
for i in range(len(s)//2):
    tmp += s[-(i+1)]

if tmp != s[0:len(s)//2]:
    tmp_p += 1

tmp_2 = s[0:(len(s)-1)//2]
tmp = ''
if len(tmp_2) != 1:
    for i in range(len(tmp_2)//2):
        tmp += tmp_2[-(i+1)]

    
    
    if tmp != tmp_2[0:len(tmp_2)//2]:
        tmp_p += 1


tmp_3 = s[(len(s)+3)//2-1:]
tmp = ''
if len(tmp_3) != 1:
    for i in range(len(tmp_3)//2):
        tmp += tmp_3[-(i+1)]
    
    
    if tmp != tmp_3[0:len(tmp_3)//2]:
        tmp_p += 1

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

Solution (Python):
S = input()
N = len(S)
a = N % 4
ans = "Yes"
if N == 3:
    if S[0] != S[2]:
        ans = "No"
elif a == 1:
    x = N // 4
    for i in range(x):
        if (S[i] != S[2 * x - i - 1]) or (S[2 * x + 1 + i] != S[4 * x - i]):
            ans = "No"
    for i in range (2 * x):
        if S[i] != S[N - 1 - i]:
            ans = "No"
elif a == 3:
    x = N // 4
    for i in range(x):
        if (S[i] != S[2 * x - i]) or (S[2 * x + 2 + i] != S[4 * x + 2 - i]):
            ans = "No"
    for i in range (2 * x + 1):
        if S[i] != S[N - 1 - i]:
            ans = "No"
print(ans)