Problem:
 Score : 200 points    Problem Statement A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:   S is a palindrome.  Let N be the length of S . The string formed by the 1 -st through ((N-1)/2) -th characters of S is a palindrome.  The string consisting of the (N+3)/2 -st through N -th characters of S is a palindrome.   Determine whether S is a strong palindrome.      Constraints  S consists of lowercase English letters.  The length of S is an odd number between 3 and 99 (inclusive).         Input Input is given from Standard Input in the following format:  S       Output If S is a strong palindrome, print Yes ;
otherwise, print No .        Sample Input 1 akasaka      Sample Output 1 Yes   S is akasaka .  The string formed by the 1 -st through the 3 -rd characters is aka .  The string formed by the 5 -th through the 7 -th characters is aka .
All of these are palindromes, so S is a strong palindrome.        Sample Input 2 level      Sample Output 2 No       Sample Input 3 atcoder      Sample Output 3 No

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    S = [x for x in sys.stdin.readline().split()][0]  
    
    
    

    
    
    
    

    logger.debug('{}'.format([]))

    N = len(S)
    if S != S[::-1]:
        print('No')
        return

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

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

    print('Yes')


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """akasaka"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """level"""
        output = """No"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """atcoder"""
        output = """No"""
        self.assertIO(input, output)

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

S = input().strip()
N = len(S)


s1 = S[0:(N-1)//2]
s2 = S[(N+3)//2-1:]

if is_palin(S) and is_palin(s1) and is_palin(s2):
    print("Yes")
else:
    print("No")

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

if ls == list(reversed(ls)) and ls[:(N-1)//2] == list(reversed(ls[:(N-1)//2])) and ls[(N+3)//2-1:] == list(reversed(ls[(N+3)//2-1:])):
    print('Yes')
else:
    print('No')

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

s1 = S[0:(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):
import copy
s = list(input())
n = len(s)
a = copy.copy(s)
a.reverse()
ans = 'No'
if s == a and s[0:(n-1)//2] == s[(n+1)//2:]:
    ans= 'Yes'

print(ans)

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

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

Solution (Python):
S = input()

N = len(S)

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

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

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

print(ans)

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

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

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

A=S[:(N-1)//2]
B=S[(N+3)//2-1:]

for i in range(len(S)):
	if S[i]!=S[-(i+1)]:
		print("No")
		exit()
for i in range(len(A)):
	if A[i]!=A[-(i+1)]:
		print("No")
		exit()
for i in range(len(B)):
	if B[i]!=B[-(i+1)]:
		print("No")
		exit()
print("Yes")

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

S1 = S[0:int((length-1)/2)]
S2 = S[int((length+3)/2)-1:]
if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:
	print("Yes")
else:
	print("No")

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

s = input()

if len(s) % 2 == 0:
    p = len(s) // 2
    if is_palindrome(s) and is_palindrome(s[:p]) and is_palindrome(s[p:]):
        print('Yes')
    else:
        print('No')
else:
    p = len(s) // 2
    if is_palindrome(s) and is_palindrome(s[:p]) and is_palindrome(s[p + 1:]):
        print('Yes')
    else:
        print('No')

Solution (Python):
S = input()

c1 = (S==S[-1::-1])
S2 = S[0:(len(S)-1)//2]
c2 = (S2==S2[-1::-1])
S3 = S[(len(S)+3)//2-1:]
c3 = (S3 == S3[-1::-1])
if c1 and c2 and c3:
  print('Yes')
else:
  print('No')

Solution (Python):
s=input()
l=len(s)
m=(l-1)//2
lst1=[]
lst2=[]
for i in range(m):
  lst1.append(s[i])
  lst2.append(s[l-i-1])
chk='T'
if lst1!=lst2:
  chk='F'
n=m//2
lst3=[]
lst4=[]
lst5=[]
lst6=[]
for i in range(n):
  lst3.append(s[i])
  lst4.append(s[m-i-1])
  lst5.append(s[m+1+i])
  lst6.append(s[l-i-1])
if lst3!=lst4:
  chk='F'
if lst5!=lst6:
  chk='F'
if chk=='T':
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()

n = len(s)
ans = "Yes"

if s != s[::-1]:
    ans = "No"
elif s[:(n-1)//2] != s[:(n-1)//2][::-1]:
    ans = "No"
elif s[(n+2)//2:] != s[(n+2)//2:][::-1]:
    ans = "No"
    
print(ans)

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

Solution (Python):
S = list(input())
N = len(S)
A = int((N-1)/2)
B = int((N+3)/2)

S_A = S[:A]
S_B = S[B-1:]

ans = 0
S_R = list(reversed(S))
if S != S_R:
    ans += 1
    
S_A_R = list(reversed(S_A))
if S_A != S_A_R:
    ans += 1
    
S_B_R = list(reversed(S_B))
if S_B != S_B_R:
    ans += 1

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

Solution (Python):
def MI():return map(int,input().split())
def LI():return list(MI())
def ok():print("Yes");return 1
def ng():print("No");return 1






s=input()
n=len(s)

s1=s[0:(n-1)//2]
s2=s[(n+3)//2-1:]
n1=len(s1)
n2=len(s2)


for i in range(n):
    if s[i]!=s[n-i-1]:
         ng()
         exit()
for i in range(n1):
    if s1[i]!=s1[n1-i-1]:
         ng()
         exit()
for i in range(n2):
    if s2[i]!=s2[n2-i-1]:
         ng()
         exit()
ok()

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


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


def MS(): return map(str, input().split())


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


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False



def main():
    s = S()
    N = len(s)

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

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

    sl = s[(N+3)//2-1:N]
    
    for i in range(len(sl)//2):
        
        if sl[i] != sl[len(sl)-i-1]:
            print('No')
            return

    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
n = len(s)
def check(st):
    return st == st[::-1]

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

Solution (Python):
inxx = input()
inxx = inxx.split()

s = inxx[0]

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

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

Solution (Python):
S = input()

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

left_rev = list(reversed(left))
right_rev = list(reversed(right))

error = 0
for i in range((N-1)//2):
    
    if left[i] != right_rev[i]:
        error = 1
        break

    
    if left[i] != left_rev[i]:
        error = 2
        break

    
    if right[i] != right_rev[i]:
        error = 3
        break

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

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

Solution (Python):

S = str(input())

len_S = len(S) // 2
left_S = S[:len_S]
right_S = S[len_S + 1:]
print("Yes" if left_S == left_S[::-1] and right_S == right_S[::-1] and left_S == right_S else "No")

Solution (Python):
def isPalin(string):
	return string==string[::-1]
string=input()
N=len(string)
if isPalin(string) and isPalin(string[:(N-1)//2]) and isPalin(string[(N+3)//2 - 1:]):
	print("Yes")
else:
	print("No")

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

Solution (Python):
import sys

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

s = sys.stdin.readline().rstrip()
n = len(s)

def main():
    res = is_palindrome(s[:n//2]) and is_palindrome(s[n//2+1:])
    return 'Yes' if is_palindrome(s) and res else 'No'

if __name__ == "__main__":
    ans = main()
    print(ans)

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

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

def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True
  
if is_kaibun(S)&is_kaibun(S[:int((N-1)/2)])&is_kaibun(S[int((N+3)/2)-1:]):
  print('Yes')
else:
  print('No')

Solution (Python):


iim = lambda: map(int, input().rstrip().split())

def resolve():
    S = list(input())
    N = len(S)

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

if __name__ == "__main__":
    resolve()

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

s = input().rstrip()

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

Solution (Python):
s = input()
x = ''.join(list(reversed(s)))
n = len(s)
ans = 'No'
if s==x:
    a = s[:(n-1)//2]
    x = ''.join(list(reversed(a)))
    if a==x:
        b = s[(n+3)//2-1:]
        x = ''.join(list(reversed(b)))
        if b==x:
            ans = 'Yes'
print(ans)

Solution (Python):
S = list(input())
SR = list(reversed(S))
length = len(S)

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

Solution (Python):

S = input()
N = len(S)

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

con1 = is_kaibun(S)
con2 = is_kaibun(S[0:int((N-1)/2)])
con3 = is_kaibun(S[int((N + 3) / 2)-1:])


if (con1 and con2 and con3):
    print('Yes')
else:
    print('No')

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

for i in range(((N-1)//2)//2+1):
    if S[i] == S[(N-1)//2-1-i] and S[i] == S[N-1-i]:
        continue
    else:
        break
else:
    for i in range((N+3)//2-1,N):
        if S[i] == S[N-1-i]:
            continue
        else:
            break
    else:
        print("Yes")
        exit()

print("No")

Solution (Python):
def isPal(s):
    l = 0
    r = len(s) - 1
    while r > l and s[l] == s[r]:
        l += 1
        r -= 1
    return r <= l

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

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

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

for i in range(m):
  if t[i]!=t[m-1-i] or u[i]!=u[m-1-i]:
    print("No")
    exit()




print("Yes")

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

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

tmp = S[:(n-1)//2]
if tmp != tmp[::-1]:
    print("No")
    exit() 

tmp = S[((n+3)//2)-1:]
if tmp != tmp[::-1]:
    print("No")
    exit()    
print("Yes")

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

judge = 0

for i in range((L-1)//2):
    if S[i] != S[L-1-i]:
        judge = judge + 1
        
for i in range((L-1)//2):
    if S[i] != S[((L-1)//2)-1-i]:
        judge = judge + 1
    
if judge == 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
def solve():
    S = input()
    N = len(S)
    part1 = S[:(N-1)//2]
    part2 = S[(N+3)//2-1:]

    if isKaibun(part1) and isKaibun(part2) and isKaibun(S):
        print('Yes')
    else:
        print('No')

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

if __name__ == '__main__':
    solve()

Solution (Python):
S = str(input())
N = len(S)
a = (N - 1) // 2
b = (N + 3) // 2
x = 0
for i in range(N):
  if S[i] != S[N - 1 - i]:
    x = 1

for i in range(a):
  if S[i] != S[a - 1 - i]:
    x = 1

for j in range(a):
  if S[j + b - 1] != S[N - 1 - j]:
    x = 1
    
if x == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
input = raw_input

s = input()
n = len(s)

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

if ok:
    n1 = (n-1) // 2
    for i in range(n1):
        if s[i] != s[n1-1-i]:
            ok = False
            break
if ok:
    n2 = (n+3) // 2
    i2 = n-1
    for i1 in range(n2-1, n):
        if s[i1] != s[i2]:
            ok = False
            break
        i2 -= 1
if ok:
    out = "Yes"
else:
    out = "No"
print(out)

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

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

Solution (Python):
S = input()
N = len(S)
S = list(S)
Sr = S[::-1]
a = S[:(N-1)//2]
b = S[(N+1)//2:]
ar = a[::-1]
br = b[::-1]
if a==ar and b == br and S==Sr:
    print('Yes')
else:
    print('No')

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


S = input()

N = len(S)

ans = True
ans &= check(S)
ans &= check(S[:(N - 1) // 2])
ans &= check(S[(N + 3) // 2 - 1:])

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

Solution (Python):
S = input()


def is_palindrome(s):
  s_rev = ''.join(reversed(s))
  return s == s_rev

halfS = len(S) // 2
if is_palindrome(S) and \
  is_palindrome(S[:halfS]) and \
  is_palindrome(S[1+halfS:]):
    print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()
l = len(s)
flag = 1
for i in range(l//2):
    if s[i]!=s[-1-i]:
        flag = 0
        break
x = int((l-1)/2)
a = s[:x]
for i in range(x//2):
    if a[i]!=a[-i-1]:
        flag = 0
        break
y = (l+3)//2
b = s[y-1:]
for i in range((l-y+1)//2):
    if b[i]!=b[-1-i]:
        flag = 0
        break
if flag==1:
    print("Yes")
else:
    print("No")

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

a1=a[:int((len(a)-1)/2)]
a2=a[int((len(a)+3)/2)-1:]
if a==a[::-1] and a1==a1[::-1] and a2==a2[::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
r=s[0:(len(s)-1)//2]
q=s[(len(s)+1)//2:len(s)]
count = 0
zyoukyou = "Yes"
for i in range(len(s)):
	if s[i]!=s[-1-i]:
		count += 1
if count != 0:
	zyoukyou = "No"
count = 0
for i in range(len(r)):
	if r[i]!=r[-1-i]:
		count += 1
if count != 0:
	zyoukyou = "No"
count = 0
for i in range(len(q)):
	if q[i]!=q[-1-i]:
		count += 1
if count != 0:
	zyoukyou = "No"
print(zyoukyou)

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math

import itertools



import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)


def main():
    s=input()
    s=list(s)
    n=len(s)
    s1=s[0:(n-1)//2]
    s2=s[(n+3)//2-1:]
    b1=s1[::-1]
    b2=s2[::-1]
    b=s[::-1]

    if s1==b1 and s2==b2 and s==b:
        ans="Yes"
    else:
        ans="No"

    print(ans)

if __name__ == "__main__":

    main()

Solution (Python):
s = input()

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

print('Yes')

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

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

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

if not x == x[::-1]:
  print("No")
  exit()

y = s[(n + 1) // 2::]

if not y == y[::-1]:
  print("No")
  exit()

print("Yes")

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






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

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

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

def is_strong(s):
    head = s[:(len(s)-1)//2]
    tail = s[(len(s)+2)//2:]
    if not is_kaibun(s):
        return False
    if not is_kaibun(head):
        return False
    if not is_kaibun(tail):
        return False
    return True

s = input()
print("Yes" if is_strong(s) else "No")

Solution (Python):
given = input()

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

former_half = given[:int(len(given)/2)]
if former_half != former_half[::-1]:
    print("No")
    exit()

latter_part = given[int((len(given) + 3) / 2 - 1):]
if latter_part != latter_part[::-1]:
    print("No")
    exit()

print("Yes")

Solution (Python):
s=list(input())
n=len(s)
a=s[:(n-1)//2]
b=s[(n+1)//2:]
s_i=s[::-1]
a_i=a[::-1]
b_i=b[::-1]

if s==s_i and a==a_i and b==b_i:
  print('Yes')
else:
  print('No')

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

Solution (Python):
S=input()
N=len(S)
T,U=S[:N//2],S[N//2+1:]
print(['No','Yes'][S==S[::-1] and T==T[::-1] and U==U[::-1]])

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

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

Solution (Python):
from copy import deepcopy
S = list(input())
N = len(S)
def judge(S):
    L = len(S)
    c = deepcopy(S)
    c.reverse()
    for i in range(L):
        if S[i] != c[i]:
            return False
    return True


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

j = judge(S) and judge(a) and judge(b)
if j:
    print("Yes")
else:
    print("No")

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

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

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

s1 = s[:(n-1)//2]
if s1!=s1[::-1]:
    print("No")
    exit(0)

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

print("Yes")

Solution (Python):
def main():
    s = input().rstrip()
    n = len(s)
    f = True
    for i in range((n+1)//2):
        if s[i] != s[len(s)-1-i]:
            f = False


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


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

if __name__ == "__main__":
    main()

Solution (Python):
S=str(input())
l=len(S)
flag=0
if S==S[::-1]:
    s1=S[0:(l-1)//2]
    s2=S[(l+1)//2:]
    if s1==s1[::-1] and s2==s2[::-1]:
        flag=1

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

Solution (Python):

def judge(s):
  t=s[::-1]
  return s==t
S=input();N=len(S)
print("Yes"if judge(S)*judge(S[:(N-1)//2])*judge(S[(N+2)//2:])else "No")

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

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

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

part_S_2 = S[((len(S)+3)//2)-1:]
for i in range(len(part_S_2)//2):
  if part_S_2[i] != part_S_2[len(part_S_2)-i-1]:
    flag = 0
    break
    
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):












mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def main():
    s = input()
    ans = 1
    t = ''
    for i in range(len(s)//2):
        t += s[i]
        if s[i]!=s[-1-i]:
            ans = 0
    if not ans:
        print("No")
        return
    u = ''
    for i in range(len(t)//2):
        u += t[i]
        if t[i]!=t[-1-i]:
            ans = 0
    if not ans:
        print("No")
    else:
        print("Yes")
    return

if __name__=='__main__':
    main()

Solution (Python):
S = list(input())
N = len(S)
M = (N - 1) // 2
X = S[:M]
L = (N + 3) // 2
Z = S[L-1:]
if S == list(reversed(S)) and X == list(reversed(X)) and Z == list(reversed(Z)):
    print('Yes')
else:
    print('No')

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

for i in range(int((n - 1) / 4)):
    if s[i] != s[int((n - 1) / 2 - 1 - i)]:
        judge = 0
        break

for i in range(int((n + 3) / 2), n):
    if s[i] != s[n - 1 - i]:
        judge = 0
        break

print("Yes" if judge == 1 else "No")

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

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

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

Solution (Python):
s = input() 

n = len(s)
hn = (n-1)//2
hs = s[:hn]

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

print('Yes')

Solution (Python):
from sys import stdin
s = str(stdin.readline().rstrip())

if s==s[::-1]:
    n=len(s)
    s2 = s[:int((n-1)/2)]
    if s2==s2[::-1]:
        s3 = s[int((n+3)/2)-1:]
        if s3==s3[::-1]:
            print("Yes")
            exit()

print("No")
exit()

Solution (Python):


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

    S = input().rstrip()

    def check(s):
        a = len(s) // 2
        for i in range(a):
            if s[i] != s[-(i+1)]:
                return False
        return True
    b = len(S) // 2
    s1 = S[:b]
    s2 = S[b+1:]
    if check(S) and check(s1) and check(s2):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
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 LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	S = IS()
	N = len(S)
	rS = ''.join(list(reversed(S)))
	if(S==rS and S[:(N-1)//2]==rS[(N+3)//2-1:] and S[(N+3)//2-1:]==rS[:(N-1)//2]):
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()

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

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

def check(st):
    rev = st[::-1]

    if rev == st:
        return True
    else:
        return False

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

Solution (Python):


s = input()
f = True

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

t = s[:(len(s)-1)//2]
if t != t[::-1]:
    f = False

t = s[(len(s)+3) // 2 - 1:]
if t != t[::-1]:
    f = False

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

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

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

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

left = S[:(N-1)//2]
right = S[(N+3)//2-1:]
if (left == left[::-1]) and (right == right[::-1]) and (left == right[::-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)
pre = s[:(n-1)//2]
suf = s[(n+3)//2-1:]
if s == s[::-1] and pre == pre[::-1] and suf == suf[::-1]:
    print("Yes")
else: print("No")

Solution (Python):
S = input().strip()
n = len(S)
S1, S2 = S[:(n-1)//2], S[(n+1)//2:]
if all((S == S[::-1], S1 == S1[::-1], S2 == S2[::-1])):
    print('Yes')
else:
    print('No')

Solution (Python):
S=list(input())
A=S.copy()
A.reverse()
if S!=A:
    print("No")
    exit()
N=len(S)
kari=S[:int(((N-1)/2))]
ans=kari.copy()
ans.reverse()
if kari!=ans:
    print("No")
    exit()
tekitou=S[int(((N+3)/2)-1):]
unti=tekitou.copy()
unti.reverse()
if tekitou!=unti:
    print("No")
else:
    print("Yes")

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

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

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


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

Solution (Python):
S=input()
s=""
for i in range(len(S)):
    s=S[i]+s
N=len(S)
L=""
for i in range((N-1)//2):
    L=L+S[i]
M=""
for i in range((N+3)//2-1,N):
    M=M+S[i]
l=""
m=""
for i in range(len(L)):
    l=L[i]+l
for i in range(len(M)):
    m=M[i]+m
flag=False
if S==s:
    if L==l:
        if M==m:
            flag=True
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()


def check_palindrome(s):
    i = 0
    j = len(s) - 1
    while i <= j:
        if s[i] != s[j]:
            return False
        i += 1
        j -= 1
    return True
t = (len(s) - 1) // 2
u = (len(s) + 3) // 2 - 1
if check_palindrome(s) and check_palindrome(s[:t]) and check_palindrome(s[u:]):
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
S=list(input())
S_f=S[:(len(S)-1)//2]
S_l=S[(len(S)+1)//2:]

if S_f!=S_l:
    print("No")
    exit()

for i in range(len(S_f)//2):
    k=-1*i-1
    if S_f[i]!=S_f[k]:
        print("No")
        exit()
print("Yes")

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

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

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

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

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

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

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

s = input()
n = len(s)

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

Solution (Python):
S=input()

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

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