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):
from sys import stdin


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


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    S =     _in[0]   
    
    N = len(S)
    flag = True
    if flag:
        flag = judge_palindrome(S)
    if flag:
        flag = judge_palindrome(S[0:(N-1)//2])
    if flag:
        flag = judge_palindrome(S[(N+3)//2-1:N])
    TF = 'Yes' if flag else 'No'
    
    print(TF)

Solution (Python):
s = input()

s1 = s[:int((len(s)/2))]
s2 = s[int((len(s)+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)
s1 = s[:(n-1)//2]
s2 = s[(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)
judge = True
for i in range(len(S)//2):
    if S[i] != S[len(S) - i - 1]:
        judge = False
        break


if judge:        
    for i in range(int((len(S)-1)/2)):
  
        if S[i] != S[int((len(S)-1)/2)- 1 - i]:
            judge = False
            break
        elif S[int((N+3)/2)-1 + i] != S[N-1-i]:
            judge = False
            break

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

Solution (Python):
S = input()

reversedS = S[::-1]

str1 = S[:int((len(S)-1)/2)]
reversedStr1 = str1[::-1]

str2 = S[int((len(S)+3)/2)-1:]
reversedStr2 = str2[::-1]

flag = False
if S == reversedS:
  if str1 == reversedStr1:
    if str2 == reversedStr2:
      print('Yes')
      flag = True
      
if flag == False:
  print('No')

Solution (Python):
def is_palindrome(S):
    pal = True
    for i in range(len(S)//2):
            if S[i] != S[len(S)-1-i]:
                pal = False
    return pal
def main():
    S = input()
    l = S[:len(S)//2]
    r = S[len(S)//2+1:]
    if is_palindrome(S) and is_palindrome(l) and is_palindrome(r):
        print("Yes")
    else:
        print("No")
main()

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


firstS=S[:math.ceil(N/2)-1]
secondS=S[int((N+3)/2-1):]

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

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

Solution (Python):
s = input()

cnt = 0
for i in range(0,len(s)):
    if s[i] != s[len(s)-1-i]: cnt += 1
    else: pass

test2 = int((len(s)-1)/2)
for i in range(0,test2):
    if s[i] != s[test2-1-i]: cnt += 1
    else: pass
    
test3 = int((len(s)+3)/2-1)
for i in range(test3,len(s)):
    if s[i] != s[len(s)-1-i]: cnt += 1
    else: pass
    
if cnt != 0: 
    print('No')
else:
    print('Yes')

Solution (Python):
import sys

S = list(input())

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


A = S[0:(len(S)-1)//2]
for i in range(0, len(A), 1):
    if A[i]!=A[-(i+1)]:
        print("No")
        sys.exit()


A = S[((len(S)+3)//2)-1:]
for i in range(0, len(A), 1):
    if A[i]!=A[-(i+1)]:
        print("No")
        sys.exit()

print("Yes")

Solution (Python):
S=input()
N=len(S)
ans='Yes'

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

if int((N-1)/2)%2==1:
    for i in range((N-3)//4):
        if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
            ans='No'
else:
    for i in range((N-1)//4):
        if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
            ans='No'
 
print(ans)

Solution (Python):
import math
org_str=input()
new_str = org_str[::-1]
if(new_str==org_str):
  org_str2=org_str[0:math.ceil((len(org_str)-1)/2)]
  new_str2=org_str2[::-1]
  if(new_str2==org_str2):
    org_str3=org_str[math.ceil((len(org_str)+3)/2):-1]
    new_str3=org_str3[::-1]
    if(new_str3==org_str3):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Solution (Python):
s = input()
l = len(s)
s1 = s[:int((l-1)/2)]
s3 = s[int((l+1)/2):]
s4 = s3[::-1]

m = s[:int((l-1)/2)]
n = len(m)
m1 = m[:int((n)/2)]
m3 = m[int((n+1)/2):]
m4 = m3[::-1]

a = s[int((l+3)/2-1):]
b = len(a)
a1 = a[:int((b-1)/2)]
a3 = a[int((b+1)/2):]
a4 = a3[::-1]


if (s1 in s4) & (m1 in m4) & (a1 in a4):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
for i in range(len(s)//4+1):
    if not s[i] == s[len(s)//2-1-i] == s[len(s)//2+1+i] == s[-1-i]:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
S = input()

length = len(S)
is_strong_palindrome = True

for i in range(length//2):
    if S[i] != S[length-i-1]:
        is_strong_palindrome = False
        break

first_half_S = S[:length//2]
second_half_S = S[length//2+1:]



length_palindrome = len(first_half_S)
for i in range(length_palindrome//2):
    if first_half_S[i] != first_half_S[length_palindrome-i-1]:
        is_strong_palindrome = False
        break
    if second_half_S[i] != second_half_S[length_palindrome-i-1]:
        is_strong_palindrome = False
        break

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

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

S = input()
N = len(S)
ans = 'Yes'
if kaibun(S):
  pass
else:
  ans = ('No')
if kaibun(S[:(N-1)//2]):
  pass
else:
  ans = ('No')
if kaibun(S[:(-(N-1)//2)-1:-1]):
  pass
else:
  ans = ('No')
print(ans)

Solution (Python):
s = input()
slen = len(s)
left = s[0: int((slen-1)/2)]
right = s[int((slen+1)/2): slen]
if s != s[::-1]:
    print('No')
elif left != left[::-1]:
    print('No')
elif right != right[::-1]:
    print('No')
else:
    print('Yes')

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

N = len(S)
palinBool = "No"

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

print(palinBool)

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

def main(s):
  l=len(s)//2
  x1=s[:l]
  x2=s[l+1:]
  if reverse(s) and reverse(x1) and reverse(x2):
    print("Yes")
  else:
    print("No")
    
if __name__=='__main__':
  main(input())

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

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

Solution (Python):


S = list(input())
N = len(S)
A = S[:(N-1)//2]
B = S[(N-1)//2+1:]

def kaibun(l):
    n = len(l)
    for i in range(max(n//2-1,1)):
        if l[i] != l[n-1-i]:
            return False
    return True
if kaibun(S) and kaibun(A) and kaibun(B):
    print('Yes')
else:
    print('No')

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

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


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

if flag==((n-1)//2):
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
n=len(s)
s1=s[:(n-1)//2]
flag=0
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

s1=s[(n+3)//2-1:]
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

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

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

Solution (Python):
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print(["Yes", "No"][not v])



def main():
    S = input(str)
    th = (len(S) - 1) // 2
    a = S
    b = S[:th]
    c = S[th+1:]
    yesno(a == a[::-1]
          and b == b[::-1]
          and c == c[::-1])


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Solution (Python):
s=input()
n=len(s)
s1=s[:(n-1)//2]
flag=0
for i in range(len(s1)//2):
  if (s1[i]!=s1[-1-i]):
    flag=1
    break



s1=s[(n+3)//2-1:]
for i in range(len(s1)//2):
  if (s1[i]!=s1[-1-i]):
    flag=1
    break



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

Solution (Python):


import sys



















def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    def check_palindrome(s):
        n = len(s)
        i = 0
        while i < (n - 1 - i):
            if s[i] != s[n - 1 - i]:
                return False
            i += 1
        return True
    
    s = input()
    n = len(s)
    left = s[:(n-1)//2]
    right = s[(n+3)//2 - 1:]
    print('Yes') if check_palindrome(left) and check_palindrome(right) and check_palindrome(s) else print('No')


if __name__ == "__main__":
    main()

Solution (Python):


from collections import defaultdict

con = 10 ** 9 + 7

def getlist():
	return list(map(int, input().split()))


def main():
	S = input()
	N = len(S)
	judge = "Yes"
	s = int((N - 3) // 2)
	t = int((N + 1) // 2)
	for i in range(int((N - 1) // 2)):
		if S[i] != S[s - i]:
			judge = "No"
		if S[t + i] != S[N - 1 - i]:
			judge = "No"

	for i in range(N):
		if S[i] != S[N - 1 - i]:
			judge = "No"

	print(judge)

if __name__ == '__main__':
	main()

Solution (Python):
s = input()

flag = True
n = len(s)
for i in range(n//4):
  if s[i] == s[(n-1)//2 -1 - i] == s[(n+3)//2 -1 + i] == s[n-1 - i]:
    if (n//2) % 2 == 1:
      if s[n//4] != s[n-1 - n//4]:
        flag = False
        break
      else:
        continue
    else:
      continue
  else:
    flag = False
    break

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

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

S_rev1 = S[::-1]
S_rev2 = S2[::-1]
S_rev3 = S3[::-1]

if S == S_rev1 and S2 == S_rev2 and S3 == S_rev3 :
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

n = len(s)

def is_palindrome(start, end):
    while start <= end:
        if s[start] == s[end]:
            start += 1
            end -= 1
        else:
            return False
    return True

if is_palindrome(0, n - 1) and is_palindrome(0, (n - 1) // 2 - 1) and is_palindrome((n + 3 // 2), n-1):
    print("Yes")
else:
    print("No")

Solution (Python):

url = "https://atcoder.jp//contests/abc159/tasks/abc159_b"

def main():
    ans = 'Yes'
    S = input()
    if S != S[::-1]:
        ans = 'No'

    t = S[0:(len(S) - 1) // 2]
    if t[::-1] != t:
        ans = 'No'

    t = S[(len(S) + 2) // 2:len(S)]
    if t[::-1] != t:
        ans = 'No'

    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()
s = len(S)
L = []
A = ""
for i in S[:int((s-1)/2)]:
    L.append(i)
    A += i
    
A = A[::-1]


B = ""
for i in S[int((s+1)/2):]:
    B += i
    
B = B[::-1]


if S == S[::-1] and A == S[:int((s-1)/2)] and B == S[int((s+1)/2):]:
    print("Yes")
else:
    print("No")

Solution (Python):

my_string = input()
my_string = my_string.casefold()
if ((len(my_string)) < 3 or (len(my_string)) > 100):
    
    print("No")
    quit()

reversed_string = reversed(my_string)

n = len(my_string)

first_chars = my_string[:int((n-1)/2)]
reversed_first_chars = reversed(first_chars)


last_chars = my_string[int((n+3)/2)-1:]
reversed_last_chars = reversed(last_chars)





if list(my_string) == list(reversed_string):
    
    if (list(first_chars) == list(reversed_first_chars)):
        if (list(last_chars) == list(reversed_last_chars)):
            print("Yes")
        else:
            print("No")
    else:
        print("No")

else:
    print("No")

Solution (Python):
import math
S=input()
N=len(S)
K=math.floor((N-1)/2)
R=math.floor((N+3)/2)

if S[0]==S[K-1] and S[R-1]==S[N-1] and S==S[::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
str = input()
f = ((len(str)-1)//2)
s = ((len(str)+3)//2)
rf=str[:f]
fr=rf[::-1]
sf=str[s-1:]
fs=sf[::-1]
if str[::-1] == str and str[:f]  == fr and str[s-1: ] == fs:
    print('Yes')
else:
    print('No')

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

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

print("No")

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

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

while i < (l-1)/2:
    if S[i] != S[-i-1] or S[i] != S[int((l-1)/2)-i-1]:
        print('No')
        break
    i = i + 1
else:
    print('Yes')

Solution (Python):

import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input().strip()
    
    def string_reverse_chk(gv, s:str):
        rev_s = "".join(list(reversed(s))[0:len(s)])
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans = "No"
        
        while True:
            slen = len(gv.s)
            reversed_s = "".join(list(reversed(gv.s))[0:slen])
            
            if gv.string_reverse_chk(gv.s) is False : break
            if gv.string_reverse_chk(gv.s[0:int((slen -1)/2)]) is False : break
            if gv.string_reverse_chk(reversed_s[0:int((slen -1)/2)]) is False : break
            
            if gv.string_reverse_chk(gv.s[int((slen +3)/2 -1):slen]) is False : break
            if gv.string_reverse_chk(reversed_s[int((slen +3)/2 -1):slen]) is False : break
            
            
            ans = "Yes"
            break
        
        print(ans)
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Solution (Python):
s=input()
n=len(s)
x=(n-1)//2
i=0
while i<x:
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
  i=i+1
else:
  print('Yes')

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

Solution (Python):
S = input()


def main():
    judge = True

    for i in range(len(S)):
        
        if S[i] != S[-(i+1)]:
            
            judge = False

    if S[0:int((len(S)-1)/2)] != S[int((len(S)+3)/2)-1:len(S)]:
        
        
        
        
        judge = False


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


if __name__ == '__main__':
    main()

Solution (Python):
def check(S):
  for i in range(len(S)//2):
    if S[i] != S[-(i+1)]:
      print("No")
      exit(0)
  
S = input()
for i in range((len(S)-1)//2):
  if S[i] != S[-(i+1)]:
    print("No")
    exit(0)
    
check(S[:(len(S)-1)//2])
check(S[len(S)+3//2:])
print("Yes")

Solution (Python):


def main():
    *S, = map(str, open(0).read().split())
    S = S[0]
    S_re = S[::-1]
    N = len(S)
    S_s1 = S[:(N-1)//2]
    S_s2 = S[(N+2)//2:]

    if (S == S_re
        and S_s1 == S_s1[::-1]
        and S_s2 == S_s2[::-1]):
        print('Yes')
    else:
        print('No')


main()

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

Solution (Python):
from heapq import *
import sys
from collections import *

from itertools import *
from decimal import *
import copy
from bisect import *
import time

import math

def gcd(a,b):
    if(a%b==0):return(b)
    return (gcd(b,a%b))
sys.setrecursionlimit(10**7)
input=lambda :sys.stdin.readline().rstrip()
S=input()
N=len(S)
for i in range(N//2):
    if S[i]!=S[-1-i]:
        print("No")
        exit()
for i in range(0,(N-1)//2):
    if S[i]!=S[(N-1)//2-1-i]:
        print("No")
        exit()

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

Solution (Python):
s = input()

n= len(s)

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


flg = True

for i in range(0, int(len(tmp1)/2)):
    if tmp1[i] != tmp1[len(tmp1)-1-i]:
        flg = False

for i in range(0, int(len(tmp2)/2)):
    if tmp2[i] != tmp2[len(tmp2)-1-i]:
        flg = False

if s != s[::-1]:
    flg = False

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

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

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

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

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

ans = 'No'

if check(S):
    if check(S[0:(N-1)//2]):
        if check(S[(N+3)//2-1:N]):
            ans = 'Yes'

print(ans)

Solution (Python):
from sys import stdin
S= list(stdin.readline().strip())
N=len(S)
left=0
right=N-1
midle_right=(N-2)//2
midle_left=(N+2)//2
while(right!=left):
    if S[left]!=S[right]:
        print("No")
        exit()
    if S[left]!=S[midle_right]:
        print("No")
        exit()
    if S[right]!=S[midle_right]:
        print("No")
        exit()
    midle_right-=1
    midle_left+=1
    if right==midle_right:
        midle_right=right-1
    if left==midle_left:
        midle_left=left+1
    left += 1
    right -= 1
print("Yes")

Solution (Python):
s = list(input())
s_f = s[0: (len(s) - 1) // 2]
s_b = s[(len(s) + 3) // 2 - 1:len(s)]

if (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):
    print('No')
else:
    print('Yes')

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


string = input()
n = len(string)
n-=1
str1 = string[0:int((n)/2)]

str2 = string[int((n)/2)+1:n+1]

if check(str1) and check(str2) and check(string):
	print("Yes")
else:
	print("No")

Solution (Python):
s=input()
n=len(s)
l=s[:(n-1)//2]
r=s[(n+3)//2-1:]

flag=True

for i in range((n-1)//2+1):
    if s[i]==s[n-i-1]:
        flag=True
    else:
        flag=False
        break
if flag:
    for j in range((len(l)-1)//2+1):
        if l[j]==l[len(l)-j-1] and r[j]==r[len(l)-j-1]:
            flag=True
        else:
            flag=False
            break
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)
ans = "Yes"

for i in range(n//2):
    if s[i] == s[n - i - 1]:
        continue
    else:
        ans = "No"
for i in range(n//2):
    if s[i] == s[n//2 - i - 1]:
        continue
    else:
        ans = "No"

print(ans)

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

s1 = S[:int(N/2)]
s2 = S[int(N/2)+1:N+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)

ans = True
for j in range(3):
    for i in range(1,N//2 +1):
        if S[i-1] != S[N- i]:
            ans = False
            break
    if j ==0:
        S1 = S[:(N-1)//2]
        S2 = S[(N-1)//2+1:]
        S =S1
    elif j==1:
        S =S2

    N =len(S) 
            
if ans==True:
    print("Yes")
else:
    print("No")

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

s = input()
n = len(s)

pivot = (n - 1) //2
pre = s[:pivot]
post = s[pivot+1:]

if pre == post and is_kaibun(pre) and is_kaibun(post):
    print('Yes')
else:
    print('No')

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

Solution (Python):

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


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

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

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

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

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

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

if s[:(n-1)//2] != s[(n+1)//2:] or s[:(n-1)//2] != s[(n-3)//2::-1]:
  ans='No'

print(ans)

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

ans = S == list(reversed(S))
ans &= S[:(len(S)-1)//2] == list(reversed(S[:(len(S)-1)//2])) 
ans &= S[((len(S)+3)//2)-1:] == list(reversed(S[((len(S)+3)//2)-1:])) 

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

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

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

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

l_f=s[0:(n-1)//2]
l_e=s[((n+3)//2)-1:n]

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

if palindrome(s) and palindrome(l_f) and palindrome(l_e):
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()
n = len(s)
t = s[:(n - 1) // 2]
u = s[(n + 1) // 2:]
if s == s[::-1]:
    if t == t[::-1]:
        if u == u[::-1]:
            print("Yes")
            exit(0)
print("No")

Solution (Python):
def solve(s):
  s = list(s)
  n = len(s)
  ans = check_palindrome(s) & check_palindrome(s[:int(((n-1)//2))]) & check_palindrome(s[int(((n+3)//2)-1):])
  return "Yes" if ans else "No"


def check_palindrome(st):
  a = list(st)
  b = list(reversed(st))
  return a == b




s = str(input())

print(solve(s))

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

def Main(S):
    N = len(S)
    a = S[:(N-1)//2]
    b = S[(N+2)//2:]
    return "Yes" if check(S) and check(a) and check(b) else "No"

def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()

Solution (Python):
def kaibun(x):
  if(x != ''.join(list(reversed(x)))):
    return 0
  else:
    return 1


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

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[(int((s_num + 1)/2)):s_num])

  if(num1 == 1 and num2 == 1):
    if(s == ''.join(list(reversed(s)))):
      print('Yes')
    else:
      print('No')
  else:
    print('No')

if __name__ == '__main__':
  main()

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

Solution (Python):
S = input()
flag = False

if S == S[::-1]:
    if S[:len(S)//2] == S[:len(S)//2][::-1]:
        if S[(len(S)+1)//2:] == S[(len(S)+1)//2:][::-1]:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

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

flag=True
for i in range(N//2):
    if S[i]!=S[N-i-1]:
        flag=False
for j in range(N//2//2):
    if S[N-N//2+j]!=S[N-j-1]:
        flag=False             
        
if flag==True:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
N = len(S)

S2 = S[:N//2]
S3 = S[N//2+1:]

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

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

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

check = 0

n = len(s)

re_s =list(reversed(s))

if re_s == s:
    check += 1

split_s = s[:(n-1)//2]
re_ss = list(reversed(split_s))
if re_ss == split_s:
    check += 1

saigo_s = s[(n+3//2):]
re_sss = list(reversed(saigo_s))

if re_sss == saigo_s:
    check += 1

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

Solution (Python):
a = input()
b = len(a)
c = (b-1)//2
d = (b+3)//2 - 1
e = a[0: c]
f = a[d: b]

if a == a[::-1] and e == e[::-1] and f == f[::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if S==inv:
        i+=1
        
    N=int((len(S)-1)/2)
    for x in range(N-1):
        if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
            pass
        else:
            j+=1
                
    if j==0 and i==1:
        print('Yes')
    else:
        print('No')

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

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

def check(s):
    sr = s[::-1]
    if s == sr:
        return True
    else:
        return False
    
if check(s) and check(s1) and check(s2):
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()
l = len(s) // 2
t = s[0:l]
if s != s[::-1]:
    print("No")
    exit()
elif t != t[::-1]:
    print("No")
    exit()
else:
    print("Yes")

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

Solution (Python):
s = input()
n = len(s)
t = s[:(n-1)//2]
u = s[(n+3)//2-1:]

if s == s[::-1]:
    if t == t[::-1]:
        if u == u[::-1]:
            print("Yes")
            exit()
print("No")

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

def kaibun(st):
  sta = list()
  for k in range(len(st)//2):
    sta.append(st[k])
  for k in range(len(st)//2):
    if st[-(-len(st)//2)+k] != sta.pop():
      return False
  return True

if kaibun(s) == False:
  print('No')
elif kaibun(s[:(n-1)//2]) == False:
  print('No')
elif kaibun(s[(n+3)//2-1:]) == False:
  print('No')
else:
  print('Yes')

Solution (Python):
s = input()
n = len(s)
cnt = 0
for i in range(n//2):
    if s[i]==s[n-1-i] and s[i]==s[i+(n+1)//2]:
        pass
    else:
        cnt += 1
if cnt == 0:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
s = input()
n = len(s)
if s[:n//2] == s[n//2+1:]:
    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] or s1 != s1[::-1] or s2 != s2[::-1]:
    print('No')
else:
    print('Yes')

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

if (len(S)%2 == 0):
    print('No')
    sys.exit()

N1 = int((len(S)-1) / 2)
N3 = int((len(S)+3) / 2)

sl = []
nl = []
for i in range(N1):
    sl.append(S[i])

for j in range(N3-1, len(S)):
    nl.append(S[j])

moji1= ''
for x in sl:
    moji1 = moji1+ x

moji2 = ''
for x in nl:
    moji2 = moji2 + x

remoji1 = list(reversed(moji1))
remoji2 = list(reversed(moji2))

res = list(reversed(S))

if moji1 == ''.join(remoji1) and moji2 == ''.join(remoji2) and S == ''.join(res):
    print('Yes')
else:
    print('No')

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

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

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


def k(a):
    for i in range(len(a)):
        if a[i] != a[len(a)-1-i]:
            return False
    else:
        return True

if k(S) & k(a) & k(b):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
halfS = S[:len(S)//2]

ans = 'No'
if S == S[::-1]:
    if halfS == halfS[::-1]:
        ans = 'Yes'
print(ans)