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()


if s != s[::-1]:
    print("No")
    exit()

mae = s[:len(s)//2]
ushiro = s[(len(s)+1)//2:]


if mae != mae[::-1]:
    print("No")
    exit()


if ushiro != ushiro[::-1]:
    print("No")
    exit()

print("Yes")

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

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

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

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


def isP(s):
    l, r = 0, len(s)-1
    while l < r:
        if s[l] != s[r]:
            return False
        l += 1
        r -= 1
    return True


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

Solution (Python):
s = input()

n = len(s)

t = s[0:((n-1)//2)]
u = s[(n+3)//2-1:n]


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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]





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

Solution (Python):


YES = "Yes"  
NO = "No"  


def is_palindrome(S: str):
    return S == S[::-1]


def solve(S: str):
    N = len(S)
    former = S[:((N-1)//2)]
    latter = S[(((N+3)//2)-1):]
    return all(map(is_palindrome, [S, former, latter]))


def main():
    S = input()  
    print(YES if solve(S) else NO)


if __name__ == '__main__':
    main()

Solution (Python):


YES = "Yes"  
NO = "No"  


def solve(S: str):
    N = len(S)
    is_whole_statement_palindrome = S == S[::-1]
    former = S[:((N-1)//2)]
    is_former_palindrome = former == former[::-1]
    latter = S[(((N+3)//2)-1):]
    is_latter_reversed = latter == latter[::-1]
    return (
        is_whole_statement_palindrome
        and is_former_palindrome
        and is_latter_reversed
    )


def main():
    S = input()  
    print(YES if solve(S) else NO)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
s = list(input())
s2 = s.copy()
s2.reverse()
n = len(s)
k = int((n-1) /2)

if s != s2:
    print("No")
else:
    first = s[:k]
    first2 = first.copy()
    first2.reverse()
    second = s[k+1:]
    second2 = second.copy()
    second2.reverse()
    if first == first2 and second == second2:
        print("Yes")
    else:
        print("No")

Solution (Python):
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter

from functools import lru_cache

sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp():
    '''
    一つの整数
    '''
    return int(input())
def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))

def NO():
    print("No")
    exit()
s = list(input())[:-1]
n=len(s)
for i in range(n // 2):
    if s[i] != s[-i - 1]:
        NO()
end=(n-1)//2
for i in range(end//2):
    if s[i] != s[end - i - 1]:
        NO()
begin = (n + 3) // 2
for i in range(begin, (n - begin) // 2):
    if s[i] != s[-i - 1]:
        NO()
print("Yes")

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

def palindrome(i):
    if i == i[::-1]:
        return True

s_1 = s[:int((n-2)/2+1)]
s_2 = s[int((n+2)/2):]

if palindrome(s) and palindrome(s_1) and palindrome(s_2):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
 
l = int((len(s)-1)/2)

s1 = s[:l]
s2 = s[-l:]

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

Solution (Python):
s = input()
l = len(s)
l_half = int((l-1)/2)
isP = True
for i in range(l_half):
    isP *= s[i] == s[l - 1 - i]

for i in range(l_half//2):
    isP *= s[i] == s[l_half - 1 - i]
    isP *= s[l_half + 1 + i] == s[l - 1 - i]
print("Yes" if isP else "No")

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] and s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
if S != ''.join(reversed(S)):
    print('No')
elif S[:((len(S)-1)//2)] != ''.join(reversed(S[:((len(S)-1)//2)])):
    print('No')
elif S[((len(S)+3)//2-1):] != ''.join(reversed(S[((len(S)+3)//2-1):])):
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
n = len(s)
for i in range(int((n-1)*0.5)):
    if s[i] != s[int((n-3)*0.5) - i] or s[i] != s[n-1 - i] or s[i] != s[int((n+1)*0.5) + i]:
        print('No')
        break
else:
    print('Yes')

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

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]:
    print("Yes")
else:
    print("No")

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

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

if t==a and u==b and s==c:
    print("Yes")   
else:
    print("No")

Solution (Python):
def main():
    I=lambda:input()
    s=I()
    if s!=s[::-1]:
        print('No')
        exit()
    s1=s[:(len(s)-1//2)+1]
    if s1!=s1[::-1]:
        print('No')
        exit()
    s2=s[(len(s)+3)//2-1:]
    if s2!=s2[::-1]:
        print('No')
        exit()
    print('Yes')
    
if __name__ == '__main__':
    main()

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

s_rev=s[::-1]

s_former=s[:(n-1)//2]
s_former_rev=s_former[::-1]

s_latter=s[(n+3)//2-1:]
s_latter_rev=s_latter[::-1]

if (s==s_rev) & (s_former==s_former_rev) & (s_latter==s_latter_rev):
  print('Yes')
else:
  print('No')

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

    return res

S = input()
N = len(S)

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

Solution (Python):
s = input()
l = len(s)
if list(s) != list(reversed(s)):
    print('No')
    exit()
if list(s[:(l - 1) // 2]) != list(reversed(s[:(l - 1) // 2])):
    print('No')
    exit()
if list(s[(l + 3) // 2 -1:l]) != list(reversed(s[(l + 3) // 2 -1:l])):
    print('No')
    exit()
print('Yes')

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

Solution (Python):
s = input()

ans = 'Yes'
if s != s[::-1]:
  ans ='No'

tmp = s[:(len(s)- 1) // 2]
if tmp != tmp[::-1]:
  ans = 'No'

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

print(ans)

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

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

k1 = int((n-1)/2)
k2 = int((n+3)/2)

ans = 0
a = 0

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

a = 0
for x in range(int(k1/2)):
    a += 1
    if s[x] != s[k1-a]:
        ans += 1

a = 0
for y in range(k2-1,n):
    a += 1
    if s[y] != s[n-a]:
        ans += 1

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

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

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

Solution (Python):
s = input()

if s != s[::-1]:
  print("No")
  exit()
  
x = s[:((len(s)-1)//2)]
if x != x[::-1]:
  print("No")
  exit()
  
y = s[((len(s)+3)//2-1):]
if y != y[::-1]:
  print("No")
  exit()

print("Yes")

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

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

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

Solution (Python):



s = input()
ls = len(s)


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


flag = False
if is_kaibun(s):
    if is_kaibun(s[:(ls-1)//2]):
        if is_kaibun(s[(ls+3)//2-1: ls]):
            flag = True

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

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


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

Solution (Python):
import sys

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

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

if isPalin(s) and isPalin(a) and isPalin(b):
    print("Yes")
else:
    print("No")

Solution (Python):
import math
s = input()
n = len(s)
zen_c = 0
kou_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
for i in range(0, math.floor((zen_l+1)/2)):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    zen_c += 1
print('Yes' if zen_c == math.floor(z/2) and zenhan == kouhan else 'No')

Solution (Python):
s=input()
n=len(s)
s1=s[:(n-1)//2]
s2=s[(n-1)//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:]

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

Solution (Python):

"""
Created on Wed May  6 16:43:04 2020

@author: shinba
"""
from sys import exit

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

S = input()
N = len(S)
if not kaibun(S):
    print("No")
    exit()
if not kaibun(S[:(N-1)//2]):
    print("No")
    exit()
if not kaibun(S[(N+1)//2:]):
    print("No")
    exit()
    
print("Yes")

Solution (Python):
S = input()
if int(len(S)) % 2 != 0:
  num = int(len(S))//2
  s1 = S[:num]
  s2 = S[num+1:]
  if s1 == s2:
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

a_ = int((N-1)//2)
b_ = int((N+3)//2 -1)
a = S[:a_]
b = S[b_:N+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) // 2

if s[:n] == s[-n:]:
    print('Yes')
else:
    print('No')

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

Solution (Python):
import sys 
S=input()
N=len(S)
n=(N-1)//2
for i in range(n):
    if S[i]!=S[-i-1]:
        print('No')
        sys.exit()
for i in range((n-1)//2):
    if S[i]!=S[n-i-1] or S[i+n+2-1]!=S[N-i-1]:
        print('No')
        sys.exit()
for i in range(1):
    if S[i]!=S[n-i-1] or S[i+n+2-1]!=S[N-i-1]:
        print('No')
        sys.exit()     
print('Yes')

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

Solution (Python):


S = input()

ans = 'No'
N = len(S)
left = S[:(N - 1) // 2]
right = S[((N + 3) // 2) - 1:]
if left == right:
    if left == left[::-1] and right == right[::-1]:
        ans = 'Yes'

print(ans)

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

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

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

for i in range(int((n-1)/2)):
    if s[i] != s[-(i+1)]:
        print("No")
        sys.exit()
        
tmps=s[:int((n-1)/2)]
for i in range(len(tmps)//2):
    if tmps[i] != tmps[-(i+1)]:
        print("No")
        sys.exit()
    

if s[:int((n-1)/2)] != s[int((n+3)/2-1):]:
    print("No")
    sys.exit()




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[::-1][:n//2]==s[::-1][:n//2][::-1] else "No")

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

Solution (Python):
from sys import stdin
import sys
import math





S = input()

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

def is_half_kaibun(s):
    s = s[0:len(s)//2]
    return is_kaibun(s)

if is_kaibun(S) and is_half_kaibun(S):
    print('Yes')
else:
    print('No')

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

if s[:n] == s[-n:]:
    print('Yes')
else:
    print('No')

Solution (Python):
sentence = input()

def check_kaibun(strings):
    result = 0
    compare_strings = strings[::-1]
    
    if strings == compare_strings:
        return True
    else:
        return False


first_half = int((len(sentence) - 1) / 2)
second_half = int((len(sentence) + 1) / 2)
last_char = len(sentence)


if check_kaibun(sentence) == True and check_kaibun(sentence[0:first_half]) == True and check_kaibun(sentence[second_half:last_char]) == True:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

def kaibun(s):
    n = len(s) // 2
    return s[:n] == s[-n:]

if kaibun(S) and kaibun(S[:len(S)]):
    print('Yes')
else:
    print('No')

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

Solution (Python):

s = input()
n = len(s)
x = s[:n // 2]
y = s[(n + 2) // 2:]
ans = True
for i in range(len(s) // 2):
    if s[i] != s[~i]:
        ans = False
for i in range(len(x) // 2):
    if x[i] != x[~i]:
        ans = False
for i in range(len(y) // 2):
    if y[i] != y[~i]:
        ans = False
print(["No", "Yes"][ans])

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

Solution (Python):
S = input()
first = S[0:int(len(S) / 2)]
second= S[-1 * int(len(S) / 2):]

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

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

N=len(S)

S_left=[S[i] for i in range((N-1)//2)]
S_right=[S[i] for i in range((N+2)//2,N)]

def kaibun(X):
    count=0
    for i in range(len(X)//2):
        if S[i]==S[len(X)-1-i]:
            count+=1
    if count==len(X)//2:
        return 1
    else:
        return 0
        
print("Yes" if kaibun(S)*kaibun(S_left)*kaibun(S_right)==1 else "No")

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

N=S[0:int((n-1)/2)]
M=S[int((n-1)/2+1):n]

def pal(l):
    k=len(l)
    ok=0
    for i in range(len(l)):
        if l[i]==l[k-1-i]:
            ok+=1
    if ok==k:
        return 'y'
    else:
        return 'n'

if pal(S)=='y' and pal(N)=='y' and pal(M)=='y':
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

s = input()

rs = s[::-1]

if s != rs:
    print("No")
    sys.exit()
    
s1 = s[:(len(s)-1)//2]
rs1 = s1[::-1]

if s1 != rs1:
    print("No")
    sys.exit()
    
s2 = s[(len(s)+1)//2:]
rs2 = s2[::-1]

if s2 != rs2:
    print("No")
    sys.exit()
    
    
print("Yes")

Solution (Python):
def kaibun(S):
    lenS = len(S)




    if S[:lenS//2] == S[:(lenS-1)//2:-1]:
        return 1
    else:
        return 0
S = input()
lenS = len(S)
if  kaibun(S) and kaibun(S[:lenS//2]) and kaibun(S[lenS//2+1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

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

Solution (Python):
S=input()
N=len(S)
 
a=False
 
for i in range(N):
    if S[i]!=S[N-1-i]:
        print("No")
        a=False
        break
    else:
        a=True
 
if a==True:
    for j in range(int((N-3)/2)+1):
        if S[j]!=S[int((N-3)/2)-j]:
            a=False
            print("No")
            break
if a==True:
    for k in range(int((N-3)/2)+1):
        if S[int((N+1)/2)+k]!=S[N-1-k]:
            a=False
            print("No")
            break
if a==True:
    print("Yes")

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

a=True

for i in range(N):
    if S[i]!=S[N-1-i]:
        print("No")
        a=False
        break

if a==True:
    for j in range(int((N-3)/2)+1):
        if S[j]!=S[int((N-3)/2)-j]:
            a=False
            print("No")
            break
if a==True:
    for k in range(int((N-3)/2)+1):
        if S[int((N+1)/2)+k]!=S[N-1-k]:
            a=False
            print("No")
            break
if a==True:
    print("Yes")

Solution (Python):
def isKaibun(text):
    n=len(text)
    if text[:n//2]==text[(n+1)//2:][::-1]:
        return 1
    else:
        return 0

S=input()
n=len(S)
if isKaibun(S):
    if isKaibun(S[:n//2]):
        print("Yes")  
    else:
        print("No")   
else:
    print("No")

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

def solve():
    S = list(input())

    if S == S[::-1]:
        
        i = (len(S) - 1) // 2
        ss = S[:i]
        if ss == ss[::-1]:
            print('Yes')
            return

    print('No')


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
import sys
def I(): return int(input())  
def Is(): return map(int, input().split())  
def LI(): return list(map(int, input().split()))  
def TI(): return tuple(map(int, input().split()))  
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  
def LS(): return list(input())  
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

s = S()
n = len(s)
a = s[:int(((n-1)/2))]
b = s[int(((n+3)/2)-1):]
if s[:] != s[::-1] or a[:] != a[::-1] or b[:] != b[::-1]:
    print("No")
    exit()
print("Yes")

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

Solution (Python):
import sys

s1 = list(map(str, input()))

s1_ = list(reversed(s1))
if s1 != s1_:
    print('No')
    sys.exit()

n = len(s1)






s3 = s1[:(n-1)//2]
s3_ = list(reversed(s3))
if s3 != s3_:
    print('No')
    sys.exit()

print('Yes')

Solution (Python):
import sys

s1 = list(map(str, input()))

n = len(s1)

for i in range(n//2):
    if s1[i] != s1[n-1-i]:
        print('No')
        sys.exit()

s2 = s1[(n+3)//2-1:]
for i in range((n-1)//4):
    if s2[i] != s2[(n-1)//2-1-i]:
        print('No')
        sys.exit()

del s1[(n+1)//2-1:]
for i in range((n-1)//4):
    if s1[i] != s1[(n-1)//2-1-i]:
        print('No')
        sys.exit()

print('Yes')

Solution (Python):
import math

'''def ncr(n,r):
    if r> n: return 0;
    return math.factorial(n)//(math.factorial(r)*math.factorial(n-r))
'''

def solve(s):
    n = len(s)
    for i in range(n):
        if S[i] != S[n-1-i]:
            print("No")
            return
    k = (n-1)//2
    for i in range(k):
        if S[i] != S[k-i-1]:
            print("No")
            return
    for i in range((n+3)//2,n):
        if S[i] != S[n-1-i]:
            print("No")
            return
    print("Yes")
    
S = input();
solve(S)

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

N = len(S_list)

is_strong = False

if list(reversed(S_list)) == S_list:
    first_half = S_list[:int((N-1)/2)]
    if list(reversed(first_half)) == first_half:
        is_strong = True

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

Solution (Python):
S = input()


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


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

Solution (Python):

import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def isPal(st):
    if(st==st[::-1]):
        return True
    return False

s = input()
n = len(s)
k = (n-1)//2
p = (n+3)//2

if(isPal(s) and isPal(s[:k]) and isPal(s[p-1:])):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()
f = s[0:(len(s)-1)//2]
b = s[(len(s)+3)//2-1:(len(s))+1]

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

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

def kaibun(mojiretsu):
    n = len(mojiretsu)
    kaibuns = True
    if (n-1)%2 == 0:
        if n >= 3:
            for i in range(0,(n-1)//2):
                if not mojiretsu[i] == mojiretsu[-i-1]:
                    kaibuns = False
                    break
        else:
            kaibuns = True
    else:
        for i in range(0,n//2):
            if not mojiretsu[i] == mojiretsu[-i-1]:
                kaibuns = False
                break

    if kaibuns:
        return True
    else:
        return False
    

kaibun1 = kaibun(s)

if kaibun1:
    N = len(s)
    s2, s3 = s[0:(N-1)//2], s[(N+3)//2-1:N+1]
    kaibun2 = kaibun(s2)
    kaibun3 = kaibun(s3)
    if kaibun2 and kaibun3:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S = input()
N = int(len(S))
Sf = S[:(N-1)//2]
Sb = S[(N+3)//2-1:]


def rotate(ST) :
    SR = ST[::-1]
    
    if ST == SR :
        return 1
    else:
        return 0


if rotate(S) == 1 and rotate(Sf) == 1 and rotate(Sb) == 1 :
    ans = 'Yes'
else :
    ans = 'No'

print(ans)

Solution (Python):
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

s = readChar()
n = len(s)

def z1(st):
	if len(st)%2==1:
		a = (len(st)-1)//2
		
		if st[:a]==st[a+1:][::-1]:
			return 1
		else:
			return 0
	else:
		a = len(st)//2
		
		if st[:a]==st[a:][::-1]:
			return 1
		else:
			return 0

def z2(st):
	a = (len(st)-1)//2
	return z1(st[:a])

def z3(st):
	a = (len(st)+3)//2
	return z1(st[a-1:])

def jud(st):
	return z1(st)*z2(st)*z3(st)


if jud(s)==1:
	print("Yes")
else:
	print("No")

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


def pal(t):
    c = 1
    for i in range((len(t)-1)//2):
        if t[i] != t[-i-1]:
            c = 0
    return c
"""
if pal(s) and pal(s[:(l-1)//2]) and pal(s[(l+3)//2-1:]):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

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

Solution (Python):


S = input()

ans = 'No'

N = len(S)
left = S[:(N - 1) // 2]
right = S[((N + 3) // 2) - 1:]
if left == right:
    if left == left[::-1] and right == right[::-1]:
        ans = 'Yes'

print(ans)

Solution (Python):

import collections
import itertools as it
import math

 
s  = input()
n = len(s)







def is_kaibun(s):
    l = len(s)
    s1 = s[:(l-1)//2]
    s2 = s[(l+3)//2-1:]

    return (s == s[::-1]), s1, s2

is_kaibun_, s1, s2 = is_kaibun(s)

if is_kaibun_:
    q1 = s[:(n-1)//2]
    is_kaibun1, s1, s2 = is_kaibun(q1)
    
    q2 = s[(n+3)//2-1:]
    is_kaibun2, s1, s2 = is_kaibun(q2)
    
    print('Yes' if is_kaibun1 * is_kaibun2 else 'No')
else:
    print('No')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

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

def solve(S: str):
    N = len(S)
    return YES if is_pal(S) and is_pal(S[:N//2]) and is_pal(S[N//2+1:]) else NO



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    print(solve(S))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

Solution (Python):
s = input()

len_s = len(s)

def palindrome(ss):
    flg = 1
    len_ss = len(ss)
    for i in range(len_ss):
        if ss[i]!=s[len_ss-1-i]:
            flg = 0
            break
    return flg

if palindrome(s) * palindrome(s[:(len_s-1)//2]) * palindrome(s[(len_s+3)//2:len_s]):
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):
import sys

s = str(input())
n = len(s)
left = s[0:int((n-1)/2)]
right = s[int(((n+3)/2)-1):n]
l = len(left)

for i in range(int((n-1)/2)):
    if s[i] == s[n-1-i]:
        continue
    else:
        print("No")
        sys.exit()

for i in range(int((n-1)/4)):
    if left[i] == left[l-1-i] and right[i] == right[l-1-i]:
        continue
    else:
        print("No")
        sys.exit()

print("Yes")

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

Solution (Python):
S = input()
l = int((len(S)-1)/2)
a = 0
for i in range(l):
  if S[i] == S[2*l-i] and S[i] == S[l-1-i] and S[i+l+1] == S[2*l-i]:
    a = a + 1
  
if a == l:
  print("Yes")
else:
  print("No")

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

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

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

Solution (Python):
s = input()
TF = []

for i in range(len(s)//2):
    if s[i] == s[-i-1]:
        TF.append(True)
    else:
        TF.append(False)
for j in range((len(s)//2)//2):
    if s[j] == s[len(s)//2 - j - 1]:
        TF.append(True)
    else:
        TF.append(False)
if all(TF):
    print("Yes")
else:
    print("No")

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

i = 0

while slist[i]==slist[int(n/2 - 3/2 - i)] and i < n/2-3/2:
  i += 1

if i < n/2 - 3/2:
  print("No")
else:
  if slist[0: int(n/2-1/2)] == slist[int(n/2+1/2):n]:
    print("Yes")
  else:
    print("No")

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    S = input().strip()
    N = len(S)
    for i in range(N):
        if S[i] != S[N-i-1]:
            print("No")
            exit()
    for i in range((N-1)//2):
        if S[i] != S[(N-1)//2-i-1] or S[(N+3)//2+i-1] != S[N-i-1]:
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()

Solution (Python):


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

if S == S[:: -1] and S_2 == S_2[:: -1] and S_3 == S_3[:: -1]:
    print('Yes')

else:
    print('No')

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

Solution (Python):
import sys
S = input()
N = len(S)
s = S[::-1]

if S != s:
    print('No')
    exit()

if (S[:(N-1)//2]) != (S[:((N-1)//2)][::-1]):
    print('No')
    exit()

if S[((N+3)//2)-1:] != S[((N+3)//2)-1:][::-1]:
    print('No')
    exit()

print('Yes')

Solution (Python):
s=list(str(input()))
l=len(s)
t=list(reversed(s))
a=[]
if s==t:
  for i in range(0,int((l-1)/2)):
    if s[i]==s[int((l-1)/2-i)-1]:
      a.append(s[i])
  if len(a)==(l-1)/2:
    print("Yes")
  else:
    print("No")
else:
  print("No")