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):
def iskaibun(s):
    for i in range(len(s)):
        if s[i] != s[-i-1]:
            return False
    return True
            

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

Solution (Python):
s = input()
n = list(s)
l = len(s)
check = 0

if l%2 == 1:
    for i in range(0,l-1):
        if n[i] != n[l-(i+1)]:
            check =1
            break
    for i in range(0,int((l-1)/2)-1):
        if n[i] != n[int(((l-1)/2)-(i+1))]:
            check =1
            break
    for i in range(0,int((l-1)/2)-1):
        if n[int((l-1)/2)+1+i] != n[(l-1-i)]:
            check=1
            break
    if check ==0:
        print('Yes')
    else:
        print('No')
else:
    print ('No')

Solution (Python):
"""
Author: guiferviz
Time: 2020-03-27 15:55:42
"""


def check_palin(s):
    i = 0
    j = len(s) - 1
    while i<j:
        if s[i] != s[j]:
            return False
        i += 1
        j -= 1
    return True

def main():
    s = input()
    n = len(s)
    middle = (n - 1) // 2
    res = check_palin(s) and check_palin(s[:middle]) and check_palin(s[middle+1:])
    print("Yes" if res else "No")


if __name__ == "__main__":
    main()

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

str = input()
is_palindrome = palindrome(str)
n = len(str)
if is_palindrome and n % 2 == 1:
  is_palindrome = palindrome(str[:(n - 1)// 2]) and palindrome(str[(n + 1) // 2:])

print("Yes" if is_palindrome else "No")

Solution (Python):
from fractions import gcd
import sys

sys.setrecursionlimit(4100000)

def ols(): return input()
def oli(): return map(int, input().split())
def olai(): return list(map(int, input().split()))
def olas(): return list(input().split())
def mlai(L): return [int(input()) for _ in range(L)]
def mlas(L): return [input() for _ in range(L)]

def palindrome(S):
    return S == S[::-1]

s = ols()

if palindrome(s) and palindrome(s[:-len(s)//2]) and palindrome(s[len(s)//2+1:]):
    print("Yes")
else:
    print("No")

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

Solution (Python):
def is_palindrome(s):
    return all(c1 == c2 for c1, c2 in zip(s, reversed(s)))


S = input()
N = len(S)

if all(is_palindrome(s) for s in (S, S[: (N - 1) // 2], S[(N + 3) // 2 - 1 :])):
    print("Yes")
else:
    print("No")

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

front = S[0:int((n-1)/2)]
back = S[int((n+1)/2):]




if front == back:
    print("Yes")
else:
    print("No")

Solution (Python):
def isPalindrome(s): 
    rev = ''.join(reversed(s)) 
    if (s == rev): 
        return True
    return False
s=input()
n=len(s)
if n%2==1:
    if isPalindrome(s):
        k=n//2
        s1=s[:k]
        if isPalindrome(s1):
            v=(n+3)//2-1 
            s2=s[v:]
            if isPalindrome(s2):
                print("Yes")
            else:
                print("No")    
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):


from sys import stdin, stdout

s = str(input())
length = len(s)
s1, s2, s3 = 0, 0, 0

def palindrome(start, end):

    for i, j in zip(range(start, end), range(end-1, 0, -1)):
        if (j == i):
            return 1
        if (s[i] != s[j]):
            print ("No")
            exit()

s1 = palindrome(0, length)
s2 = palindrome(0, int(((length-1)/2)))
s3 = palindrome(int(((length+3)/2))-1, length)

print ("Yes")

Solution (Python):
def P(s):
  return s==s[::-1]
 
S=list(input())
N=len(S)
print('Yes' if P(S) and P(S[:N//2]) and P(S[N//2+1:]) else 'No')

Solution (Python):
s = input()
ans = True
def isP(l):
  return l == l[::-1]
if not isP(s):
  ans = False
if not isP(s[:len(s)//2]):
  ans = False
if ans:
  print('Yes')
else:
  print('No')

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
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():
    s = S()
    n = len(s)
    s1 = s[:(n-1)//2]
    s2 = s[((n+3)//2)-1:][::-1]
    if len(s1) % 2 == 0:
        s11 = s1[:len(s1)//2]
    else:
        s11 = s1[:(len(s1)-1)//2]
    s12 = s1[((len(s1)+3)//2)-1:][::-1]
    if s1 == s2 and s11 == s12:
        print('Yes')
    else:
        print('No')
    return



if __name__ == "__main__":
    solve()

Solution (Python):
s=input()
S=[a for a in s]
N=len(S)
number=0
for a in range(N//2):
    if S[a]==S[N-a-1]:
        number+=1
if number!=N//2:
    print('No')
else:
    n=N//2
    answer=0
    for b in range(n//2):
        if S[b]==S[n-1-b]:
            answer+=1
    if answer!=n//2:
        print('No')
    else:
        moji=S[n+1:]
        suuji=0
        for a in range(n//2):
            if moji[a]==moji[n-a-1]:
                suuji+=1
        if suuji==n//2:
            print('Yes')
        else:
            print('No')

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

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

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


s = input()
print('Yes' if solve(s) else 'No')

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

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

c = int(n/2)

for i in range(c):
    if s[i] != s[-i-1]:
        print('No')
        exit()

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

for i in range(c+1, c+1+int(c/2)):
    if s[i] != s[-i-1]:
        print('No')
        exit()

print('Yes')

Solution (Python):
s=input()
wlist=[]
for ch in s:
  wlist.append(ch)
N=len(wlist)
F=int((N-1)/2)
A=int((N+3)/2)
r=0
for i in range(F-1):
  if wlist[i]!=wlist[N-1-i]:
    r=r+1
  if wlist[i]!=wlist[F-1-i]:
    r=r+1
  if wlist[A-1+i]!=wlist[N-1-i]:
    r=r+1
if r==0:
  print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
s=input()
n=len(s)
h=n//2

ans = "Yes"
for i in range(h):
  if s[i] != s[-i-1]:
    ans = "No"

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

p = int((n+3)/2)-1
p2 = s[p:]
for i in range(len(p2)//2):
  if p2[i] != p2[-i-1]:
    ans = "No"
    
print(ans)

Solution (Python):
def judge(s):
    inv_str = s[::-1]
    
    if(s == inv_str):
        return 0
    else:
        return 1

x = str(input())
len = len(x)
x1 = x[:int((len-1)/2)]
x2 = x[int((len+3)/2-1):]

if(judge(x1)==0 and judge(x2)==0 and judge(x)==0):
    print("Yes")
else:
    print("No")

Solution (Python):


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

def cal(h, s):
    for i in range(h):
        j = (i*-1)-1

        if s[i] != s[j]:
            print('No')
            exit()


cal(h, s)
cal(len(s1), s1)
cal(len(s2), s2)


print('Yes')

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

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

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

for i in range(len(S) // 2):
    if S[i] != S[len(S) - 1 - i]:
        flag = False

for i in range((len(S) - 1) // 2 //2):
    if S[i] != S[(len(S) - 1) // 2 -1 - i]:
        flag = False

for i in range((len(S) - (len(S) + 3 // 2)) // 2):
    if S[(len(S) + 3) // 2 -1 + i] != S[len(S) - 1 - i]:
        flag = False
        
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-1-i]:
        ans = 'No'
        break

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

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

print(ans)

Solution (Python):
S = str(input())
N = len(S)
L = []
for i in range(int((N-1)/2)):
    if S[i] == S[int((N-3)/2)-i] and S[int((N+1)/2)+i] == S[N-i-1]:
        L.append('Yes')
    else:
        L.append('No')
for i in range(N):
    if S[i] == S[N-1-i]:
        L.append('Yes')
    else:
        L.append('No')
if all(x=='Yes' for x in L):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
T = list(S)
M = (N-1)/2
i = 0
j = int(M)

if j%2 == 1:
    while i == j-1 or i == j:
        if T[i] != T[j-1]:
            j = -1
            break
        i += 1
        j -= 1
        
P = int((N+3)/2)
i = 0
while P < N+1:
    if T[i] != T[P-1]:
        j = -1
        break
    i += 1
    P += 1

if j != -1:
    print('Yes')
else :
    print('No')

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

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

Solution (Python):
S = input()
T = list(S)
Tlength = len(S)
N = int((len(S)-1)/2)
halfN1=int(N/2)
halfN2=int((Tlength+N)/2)
check=0




for i in range(0,N):
    if T[i]!=T[Tlength-1-i]:
        check=1
        break
for i in range(0,halfN1):
    if T[i]!=T[N-1-i]:
        check=1
        break
for i in range(0,halfN1):
    if T[N+1+i]!=T[Tlength-1-i]:
        check=1
if check==1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
N = len(S)
flg = True
i = 0
while i <= (N-3)/2:
    if S[i]!=S[int((N-3)/2-i)]:
        flg = False
    i += 1
i = N-1
while i >= (N+1)/2:
    if S[i]!=S[int((3*N-1)/2-i)]:
        flg = False
    i -= 1
i = 0
while i <= N-1:
    if S[i]!=S[N-1-i]:
        flg = False
    i += 1
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
T = list(S)
i = 0
chack = 0

while i != int((N-1)/2):
    if T[i] != T[N-i-1]:
        chack = 1
        break
    else:
        i = i+1

i = 0
while i != int((N-1)/4):
    if T[i] != T[int((N-1)/2-i-1)]:
        chack = 1
        break
    else:
        i = i+1

i = 0
while i != int((N-1)/4):
    if T[int((N+1)/2)+i] != T[N-i-1]:
        chack = 1
        break
    else:
        i = i+1

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

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

Solution (Python):


def checkpalindrome(s):

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

    return True

S =  input()






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

Solution (Python):
s =str(input())
if s == s[::-1]:
  n = int((len(s)-1)/2)
  half_s = s[0:n] 
  if half_s == half_s[::-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
s = input()
n = len(s)
a = s[:4]
done = False
if s == s[::-1]:
    if s[:(n - 1) //2] == s[:(n - 1) //2][::-1]:
        if s[(n + 1) // 2:] == s[(n + 1) // 2:][::-1]:
            print('Yes')
            done = True
if not done:
    print('No')

Solution (Python):
from sys import stdin
r = stdin.readline

def is_palin(t):
    ans, n = True, len(t)
    for i in range((n//2)+1):
        if t[i]!=t[n-i-1]: ans=False; break
    return ans

def main():
    t = r().strip()
    n = len(t)
    print("Yes" if is_palin(t) and is_palin(t[:((n-1)//2)]) and is_palin(t[(n+2)//2:]) else "No") 

main()

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

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

Solution (Python):

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

Solution (Python):
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)


if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            

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

Solution (Python):
str = input()

str1 = str[::-1]
a = str1 == str
str2 = str[:int((len(str)-1)/2)]
str3 = str2[::-1]
b = str3 == str2
str4 = str[int((len(str)+3)/2)-1:]
str5 = str4[::-1]
c = str5 == str4
if a and b and c:
    print("Yes")
else:
    print("No")

Solution (Python):
def isPalindrome(string):
    reverse = string[::-1]
    if(string == reverse):
        return True
    return False
string = input()
if(isPalindrome(string) and isPalindrome(string[0:int((len(string)-1)/2)]) and isPalindrome(string[int((len(string)+3)-1/2):])):
    print('Yes')
else:
    print('No')

Solution (Python):
S = str(input())
Reverse_S = S[::-1]
N = len(S)
R = S[:(N-1)//2]
Reverse_R = R[::-1]
L = S[N+3//2:]
Reverse_L = L[::-1]

if S==Reverse_S and R==Reverse_R and L==Reverse_L:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

num = len(S)
S1 = S[:(num-1)//2]
S2 = S[(num+1)//2:]

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

s1_rev = s1[::-1]
s2_rev = s2[::-1]

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

Solution (Python):
a = input()
if len(a) % 2 == 0:
    print('No')
else:
    N = int((len(a) - 1) / 2)
    if a[:N] == a[-N:] == a[:N:-1]:
        print('Yes')
    else:
        print('No')

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

Solution (Python):
s = list(input())
s_re = list(reversed(s))
n = len(s)
s2 = [s[i] for i in range((n-1)//2 )]
s2_re = list(reversed(s2))
s3 = [s[i] for i in range((n+3)//2 - 1,n)]
s3_re = list(reversed(s3))
if (s == s_re) and (s2 == s2_re) and (s3 == s3_re):
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
ls = list(s)
ls1 = ls[:int((len(ls)-1)/2)]
ls2 = ls[int((len(ls)+3)/2) - 1:]
def kt(l):
    lr = list(reversed(l))
    if l == lr:
        return 1
    else:
        return 0
a = kt(ls)
b = kt(ls1)
c = kt(ls2)


d = a + b + c

if d >= 3:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
H = len(S)//2

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

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

FS = S[:int((len(S) - 1)/ 2)]
BS = S[int((len(S) + 3) / 2) -1:]

r_S = list(reversed(S))
r_FS = list(reversed(FS))
r_BS = list(reversed(BS))
flag = 0

for i in range(len(S)):
    
    if r_S[i] == S[i] and r_FS == FS and r_BS == BS:
        flag = 1

        continue
    else:
        print('No')
        flag = 0
        break
    
if flag == 1:
    print('Yes')

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

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


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

Solution (Python):
def gattai(s):
	g = ""
	for j in s:
		g += j
	return g

def judge(S, N):
	
	S1 = gattai(S[:int(N / 2)])
	
	S2 = gattai(S[int(N / 2 + 1):])
	if S1 == S2:
		if S1 == S1:
			if S2 == S2:
				return "Yes"
	return "No"

S = list(input())
N = len(S)
print(judge(S, N))

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

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



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

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

Solution (Python):
def P(S):
    T = S[::-1]
    return True if S == T else False

S = input()
N = len(S)
T = S[:N//2]

if P(S) == False or P(T) == False:
    print("No")
else:
    print("Yes")

Solution (Python):
input_ = input()
length = int(len(input_))
if length%2==0:
  print('No')
  exit(0)
f,b = input_[:int((length-1)/2)],input_[int((length-1/2)):]
str_ = [input_,f,b]
for s in str_:
  
  if s==''.join(list(reversed(s))): pass
  else:
    print('No')
    exit(0)
print('Yes')

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

if not S == S[::-1]:
    is_strong_palindrome = False

S_head = S[:(N-1)//2]
if not S_head == S_head[::-1]:
    is_strong_palindrome = False

S_tail = S[:(N-1)//2]
if not S_tail == S_tail[::-1]:
    is_strong_palindrome = False

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

Solution (Python):
S=input()
N=len(S)
def is_kaibun(a,b):
    for i in range(a,b+1):
        if i>=b-i:
            break
        if S[i]!=S[b-i]:
            return False
    return True
if is_kaibun(0,(N-3)//2) and is_kaibun((N+1)//2,N-1) and is_kaibun(0,N-1):
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
def ok():
    print("Yes")
    return

def ng():
    print("No")
    exit()
    return


s=input()
n=len(s)
if s!=s[::-1]:ng()
s1=s[:n//2]
if s1!=s1[::-1]:ng()

ok()

Solution (Python):



def main():
    s = 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')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
s=input()

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
count=0
s=input()
len_s=len(s)
center=int((len_s-1)/2+1)
s_former=s[0:center-1]
s_leter=s[center:]
for a in range(int((len(s)-1)/2-1)):
    if(s[a]==s[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_former)+1)/2)):
    if(s_former[a]==s_former[-1-a]):
        pass
    else:
        count+=1
for a in range(int((len(s_leter)+1)/2)):
    if(s_leter[a]==s_leter[-1-a]):
        pass
    else:
        count+=1
if(count==0):
    print("Yes")
else:
    print("No")

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

if s == s[-1::-1]:
    s.insert(0, 'Z')
    a = s[1:(len(s)-1)//2+1]
    b = s[(len(s)+3)//2:]

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

Solution (Python):
s=input()

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

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

if flag:
    print('Yes')

else:
    print('No')

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

sr = s[::-1]
ans = 'Yes'
if s != sr :
  ans = 'No'
  
s1 = s[0:(n-1)//2]
sr = s1[::-1]
if s1 != sr :
  ans = 'No'
  
s2 = s[(n+3)//2-1:n]
sr = s2[::-1]
if s2 != sr :
  ans = 'No'
  
print(ans)

Solution (Python):
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        break

if answer == "Yes":
    for i in range(int(strongn1/2)):

        if kaibun[i] == kaibun[strongn1-i-1]:
            answer = "Yes"
        else:
            answer="No"
            break
if answer == "Yes":
    for i in reversed(range(strongn2+int(strongn1/2)-1,n)):
        if kaibun[i] == kaibun[strongn2-2-i+n]:
            answer = "Yes"
        else:
            answer = "No"
            break
print(answer)

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




def check_Palindrome(S):







    return S == S[::-1]


N = len(S)

S_check2 = S[:int((N-1)/2)]

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

if (check_Palindrome(S) == 1) & (check_Palindrome(S_check2) == 1) & (check_Palindrome(S_check3) == 1):
    print('Yes')
else:
    print('No')

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

Solution (Python):
if __name__ == '__main__':
    a = input()
    a_len = len(a)
    
    top_s = a[:int((a_len-1)/2)]
    tail_s = a[int((a_len+3)/2)-1:]
    if a ==  ''.join(list(reversed(a))) and top_s == ''.join(list(reversed(top_s))) and tail_s == ''.join(list(reversed(tail_s))):
        print('Yes')
    else:
        print('No')

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

A = str(s[:(n-1)//2])
B = str(s[(n+3)//2-1:])

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

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

Solution (Python):
X = input()
X1 = X[::-1]
y1 = (len(X)-1)/2
X2 = X[:int(y1)]
X21 = X2[::-1]
y2 = (len(X)+3)/2
X3 = X[int(y2)-1:]
X31 = X3[::-1]
if X==X1 and X2==X21 and X3==X31:
  print('Yes')
else:
  print('No')

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

Solution (Python):
S=input()
N=int(len(S))
C=int(0)
for i in range(N):
    if(S[i]!=S[N-1-i]):
        C=1
        print('No')
        break
if C==0:
    for i in range(int((N-1)/2)):
        if(S[i]!=S[int(((N-1)/2)-1-i)]):
            C=1
            print('No')
            break
if C==0:
    print('Yes')

Solution (Python):


s = input()

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

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)

Solution (Python):
s = input()
lis = list(s)
ans = ""
s_rev = ""
s1 = ""
s1_rev = ""
s2 = ""
s2_rev =""
n = len(s)

def check(s,t):
    if s == t:
        return True
    else:
        return False

for i in range(n):
    s_rev+=lis[n-i-1]
for i in range(0,int((n-1)/2),1):
    s1+=lis[i]
    s1_rev+=lis[int((n-1)/2)-i-1]
for i in range(int((n+1)/2), n, 1):
    s2+=lis[i]
    s2_rev+=lis[int((n+1)/2)-i-1]

tf1 = check(s,s_rev)
tf2 = check(s1,s1_rev)
tf3 = check(s2,s2_rev)
if tf1 == True and tf2 == True and tf3 == True:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):

def inputlist(): return [int(i) for i in input().split()]


S = list(input())
sa = S[:]
sa.reverse()
n = len(S)
ss = S[:(n-1)//2]
SS = S[(n+1)//2:]
ssaa = ss[:]
ssaa.reverse()
SSAA = SS[:]
SSAA.reverse()
if S == sa and ss == ssaa and SS == SSAA:
    print("Yes")
else:
    print("No")

Solution (Python):
def is_palindrome(S, i, j):
    if i >= j:
        return True
    return S[i] == S[j] and is_palindrome(S, i + 1, j - 1)

s = input()
n = len(s)
print('Yes' if is_palindrome(s, 0, n - 1) and is_palindrome(s, 0, (n-1)//2 - 1) and is_palindrome(s, (n+1)//2, n - 1) else 'No')

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

if S == list(reversed(S)):
  if S[0:(N-1)//2] == list(reversed(S[0:(N-1)//2])):
    if S[(N+2)//2:] == list(reversed(S[(N+2)//2:])):
      isStrongPalindrome = True

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

Solution (Python):
def IsPalindrome(st):
    if len(st)%2==0:
        e = int(n/2-1)
    else:
        e = int((n-1)/2-1)
        
    for i in range(0, e):
        if st[i]!=st[-(i+1)]:
            return(False)
    return(True)


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


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

Solution (Python):
import math
text = input()
reply = "Yes"

if text != text[::-1]:
    reply = "No"

tmp = text[0:math.floor((len(text)-1)/2)]
if tmp != tmp[::-1]:
    reply = "No"

text = text[::-1]
tmp = text[0:math.floor((len(text) -1)/2)]
if tmp !=tmp[::-1]:
    reply = "No"

print(reply)

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

for i in range((N-1)//4):
    if S[i] == S[(N-1)//2-1-i] and S[(N+3)//2-1+i] == S[N-1-i]:
        continue
    else:
        flag = False
        break

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

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

Solution (Python):
s = input()
rs = s[::-1]
if s != rs:
  print("No")
  exit()
n = len(s)
m = int((n-1)/2)
l = int((n+1)/2)
if s[:m] != rs[l:]:
  print("No")
  exit()
if s[l:] != rs[:m]:
  print("No")
  exit()
print("Yes")

Solution (Python):
S=input()
N=len(S)
fg1 = S == S[::-1]
T=S[:(N-1)//2]
fg2 = T == T[::-1]
U=S[(N+3)//2-1:]
fg3 = U == U[::-1]

if fg1 and fg2 and fg3:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

S = input()
N = len(S)


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


print('Yes' if all(is_palindrome(s) for s in [S, S[:(N - 1) // 2], S[(N + 3) // 2 - 1]]) else 'No')

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

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


if S != S[::-1]:
  ans = 'No'


tmp = S[:int((N-1)/2)]
if tmp != tmp[::-1]:
  ans = 'No'


tmp = S[int((N+3)/2-1):]
if tmp != tmp[::-1]:
  ans = 'No'

print(ans)

Solution (Python):
def is_palindrome(s: str) -> bool:
    return s[::-1] == s

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

Solution (Python):
import math

text = input()
reply = "Yes"

if text != text[::-1]:
    reply = "No"

tmp = text[0:math.floor((len(text) - 1) / 2)]
if tmp != tmp[::-1]:
    reply = "No"

text=text[::-1]
tmp = text[0:math.floor((len(text) - 1) / 2)]
if tmp != tmp[::-1]:
    reply = "No"

print(reply)

Solution (Python):

s = input()
len_s = len(s)
if s[:int((len_s-1) /2)] != s[int((len_s-1) / 2 +1):]:
    print('No')
else:
    tmp = s[:int((len_s -1 ) /2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp ) %2 == 1:
            if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
                print('Yes')
            else:
                print('No')

Solution (Python):
from sys import *
from math import *
from collections import deque
input = stdin.readline
lmi = lambda: list(map(float, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

s = si()

def p(x):
    return x == x[::-1]

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