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()
si=s[::-1]
a=s[:(len(s)-1)//2]
b=s[(len(s)+1)//2:]
if s == si :
    if a == a[::-1] and b == b[::-1]:
        print(("Yes"))
        exit()
print("No")

Solution (Python):
S = input()
answer = 'Yes'
if S != S[::-1]:
    answer = 'No'
first = S[:len(S) // 2]
last = S[len(S) // 2 + 1:]
if first != first[::-1]:
    answer = 'No'
if last != last[::-1]:
    answer = 'No'
print(answer)

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

def isPalindrome(s):
  n = len(s)
  re_s = s[::-1]
  for i in range(n // 2):
    if re_s[i] != s[i]:
      break
  else:
    return True
  return False

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

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

Solution (Python):
s=str(input())
ans=0
if s==s[::-1] and s[:(len(s)-1)//2]==s[(len(s)-1)//2-1::-1] and s[(len(s)+3)//2-1:]==s[:(len(s)+3)//2-2:-1]:
    ans+=1
print("NYoe s"[ans::2])

Solution (Python):


S = input()

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

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

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

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

if not S.islower():sys.exit()
if not ( 3 <= len(S) <= 99 and len(S) % 2 == 1 ): sys.exit()


first = int((len(S)-1)/2)
F = S[0:first]
last = int((len(S)+3)/2)
L = S[last-1:]
condition = 0
if S == S[::-1]:
    condition += 1
if F == F[::-1]:
    condition += 1
if L == L[::-1]:
    condition += 1

print('Yes') if condition == 3 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):

import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode().rstrip()
N = len(S)
half = N // 2
for i in range(half):
    if S[i] != S[-(i+1)]:
        print('No')
        sys.exit()
SS = S[:half]
for i in range(half//2):
    if SS[i] != SS[-(i+1)]:
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
from sys  import stdin,stdout

import bisect

import math

def st():
    return list(stdin.readline().strip())

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

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

def mp():
    return map(int,stdin.readline().split())

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
        a*=a
        n=n>>1
    return r


def solve():
    s=input()
    n=len(s)
    a=s[:(n-1)//2]
    b=a[::-1]
    c=s[(n+3)//2 -1 :]
    d=c[::-1]
   
    if s==s[::-1] and a==b and c==d:
        print("Yes")
    else:
        print("No")


for _ in range(1):
    solve()

Solution (Python):
S = input()
N = len(S)
count1,count2,count3 = 0,0,0
flg1,flg2,flg3 = False,False,False
for i in range(N):
    
    if S[i] == S[-1-i]:
        count1 += 1
if count1 == N:
    flg1 = True

a = int((N-1)/2)
for i in range(a):
    
    if S[i] == S[a-1-i]:
        count2 += 1
if count2 == int((N-1)/2):
    flg2 = True

b = int((N+3)/2)

for i in range(N-b+1):
    
    if S[b+i-1] == S[N-i-1]:
        count3 += 1
if count3 == N-b+1 :
    flg3 = True
if flg1 == True and flg2 == True and flg3 == True:
    print("Yes")
else:
    print("No")

Solution (Python):


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

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

S = input()
N = len(S)

SS = S[0:(N-1)//2]
NN = len(SS)

SSS = S[((N+3)//2)-1:]
NNN = len(SSS)

check(S, N)
if len(SS)%2 == 0:
  ot_check(SS, NN)
else:
  check(SS, NN)
if len(SSS)%2 == 0:
  ot_check(SSS, NNN)
else:
  check(SSS, NNN)

print("Yes")

Solution (Python):

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

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

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

Solution (Python):
s = input()

def kaibun(s):
    if s == s[::-1]:
        return 1
    else:
        return 0
        
q = len(s)
d = int((q-1)/2)
ket = s[0:d]
mat = s[int((q+1)/2):q]

if (kaibun(s) + kaibun(ket) + kaibun(mat)) == 3:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s=input()

mozisuu=len(s)

def hanteiki(s):
    hantei=True
    mozisuu=len(s)
    for i in range(len(s)):
        if s[i]!=s[mozisuu-i-1]:
            hantei=False
    return hantei
            
if hanteiki(s):
    if hanteiki(s[0:(mozisuu-1)//2]):
        if hanteiki(s[(mozisuu+3)//2-1:]):
            print("Yes")
            exit()

print("No")

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

check_1 = palindrome(s)
check_2 = palindrome(s[:(n)//2])
check_3 = palindrome(s[(n+2)//2:])

if check_1 and check_2 and check_3:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
n = len(S)
confS = S[::-1]
flag1 = False
flag2 = False
flag3 = False
s1 = S[0:int((n-1)/2)]
confs1 = s1[::--1]
s2 = S[int((n+3)/2)-1:n]
confs2 = s2[::-1]
if S == confS:
  flag1 = True
if s1 == confs1:
  flag2 = True
if s2 == confs2:
  flag3 = True
if flag1 and flag2 and flag3:
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
t=len(S)
print("YNeos"[sum(1for i in range(t) if S[i]!=S[~i] )!=0 or S[(t+2)//2:]!=S[:(t-1)//2]::2])

Solution (Python):
s=input();print(['No','Yes'][s[:len(s)//2]==s[len(s)//2+1:]])

Solution (Python):
s = input()
n = len(s)
n2 = (n+1)//2
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[n2-2-i]):
    print("No")
    exit()
  if(s[n2+i] != s[n-i-1]):
    print("No")
    exit()
print("Yes")

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

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

s_first = s[:(N-1)//2]
s_second = s[(N+1)//2:]

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

Solution (Python):
def flg(s):
  le = len(s) // 2
  return s[:le] == s[::-1][:le]


s = input()
le1 = len(s) // 2
t = s[:le1]

print(["No", "Yes"][flg(s) and flg(t)])

Solution (Python):

import sys
import collections as cl


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 main():
    S = input()
    N  = len(S)
    
    for i in range(N):
        if S[i] != S[N-i-1]:
            print("No")
            exit()
    half = int((N-1)/2)
    for i in range(half):
        if S[i] != S[half-i-1]:
            print("No")
            exit()
            
    for i in range(half+2,N):
        if S[i] != S[N-i-1]:
            print("No")
            exit()
        
    print("Yes")
    


main()

Solution (Python):
s = input()

flag = 1

l = len(s)

for i in range((l-1)//2):
    if s[i] == s[(l-1)//2 - 1-i]:
        continue
    else:
        flag = 0
        break

if s[:(l-1)//2] != s[(l+3)//2-1:]:
    flag = 0

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

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

s_1 = s[:s_len]
s_1_len = int((len(s_1) - 1) / 2)

s_2 = s[s_len+1:]
s_2_len = int((len(s_2) - 1) / 2)

ans = 'Yes'

for i in range(s_len+1):
  if s[i] != s[-i-1]:
    ans = 'No'
    break

for i in range(s_1_len+1):
  if s_1[i] != s_1[-i-1]:
    ans = 'No'
    break

for i in range(s_2_len+1):
  if s_2[i] != s_2[-i-1]:
    ans = 'No'
    break

print(ans)

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

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

for i in range((L-1)//4):
    if S[i] != S[(L-1)//2-1-i]:
        print("No")
        exit()

for i in range(L-1, L - (L-1)//4, -1):
    if S[i] != S[i - (L-1)//2-1]:
        print("No")
        exit()

print("Yes")

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

Solution (Python):
S=input()
i=0
kot=[]
for a in S:
    kot.append(a)
tok=list(reversed(kot))

for a in range(len(kot)):
    if kot[a]==tok[a]:
        i=0
    else:
        print("No")
        i=1
        break
if i==0:
    for a in range(int((len(kot)-1)/2)):
        if kot[a]==tok[int((len(kot)-1)/2)-a-1]:
            i=0
        else:
            print("No")
            i=1
            break

if i==0:
        for a in range(int((len(kot)-1)/2)):
            if kot[int((len(kot)+3)/2)+a-1]==tok[-a-1]:
                i=0

            else:
                print("No")
                i=1
                break

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

Solution (Python):
s = input()
n = len(s)
s_re =s[::-1]
s_first = s[:(n-1)//2]
s_first_re = s_first[::-1]
s_second = s[(n+3)//2-1:]
s_second_re = s_second[::-1]

print(['No','Yes'][s == s_re and s_first==s_first_re and s_second == s_second_re])

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

Solution (Python):
S = input()
N = len(S)
for k in range(0, (N-1)//2):
  if S[k] == S[(N-1)//2 - k -1] == S[(N-1)//2 + k + 1] == S[-k-1]:
    continue
  else:
    print('No')
    exit()
print('Yes')

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

for i in range(p):
    if s[i]==s[p-1-i]:
        t=1
    else:
        t=0
        break;

x=1

for i in range(p):
    if s[p+1+i]==s[n-1-i]:
        x=1
    else:
       x=0
       break

y=1

for i in range(n):
    if s[i]==s[n-1-i]:
        y=1
    else:
       y=0
       break

if (t==1 and x==1 and y==1):
    print('Yes')
else:
    print('No')

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

r_S = S[::-1]

head_S = S[0: int((N - 1) / 2)]
r_head_S = head_S[::-1]

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

if S == r_S and head_S == r_head_S and end_S == r_end_S:
    print("Yes")
else:
    print("No")

Solution (Python):
def isPalindrome(string):
    flag = True
    len_string = len(string)
    if len_string == 1:
        return flag
    for i in range(len_string//2):
        if string[i] != string[-1-i]:
            flag = False
            break
    return flag

S = input()
len_s = len(S)
fro_s = S[:len_s//2]
if len_s % 2 == 0:
    bak_s = S[-len_s//2:]
else:
    bak_s = S[-len_s//2 + 1:]

if isPalindrome(S) and isPalindrome(fro_s) and isPalindrome(bak_s):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
 
def isp(s):
  n = len(s)
  for i in range(n // 2):
    if s[i] != s[n - 1 - i]:
      return False
  return True
 
if isp(S) and isp(S[0:(N - 1) // 2]):
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
s=len(S)
a=''
b=''
for i in range((s-1)//2):
    a+=S[i]
for n in range((s+3)//2-1,s):
    b+=S[n]
if a==b:
    A=a[::-1]
    B=b[::-1]
    if A==a and B==b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S=input()
s=len(S)
a=''
b=''
for i in range(0,(s-1)//2):
    a+=S[i]
for n in range((s+3)//2-1,s):
    b+=S[n]
if a==b:
    A=a[::-1]
    B=b[::-1]
    if A==a and B==b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):

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

s = input()
n = len(s)

ans = False
if is_kaibun(s):
    s = s[:n//2]
    if is_kaibun(s):
        ans = True
        
if ans:
    print('Yes')
else:
    print('No')

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


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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    S = list(input().rstrip())
    N = len(S)
    if S != list(reversed(S)):
        print("No")
    elif S[:int((N-1)/2)] != list(reversed(S[:int((N-1)/2)])):
        print("No")
    elif S[int((N+3)/2) - 1:] != list(reversed(S[int((N+3)/2) - 1:])):
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
S = input()
m = len(list(S)) // 2
l = m + 1
print('Yes' if (S == S[::-1]) & (S[:m] == S[:m:][::-1]) & (S[l:] == S[l::][::-1]) else 'No')

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

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

s = input()
len_s = len(s)
if is_kaibun(s[0:(len_s // 2)]) and is_kaibun(s):
    print('Yes')
else:
    print('No')

Solution (Python):
def han(l):
    for i in range((len(l) // 2)):
        if l[i] != l[-i - 1]:
            return 0
    return 1

S = input()

f1 = han(S)
S2 = S[0:(len(S) // 2)]
S3 = S[len(S)//2 + 1 : len(S)]
f2 = han(S2)
f3 = han(S3)

if f1 * f2 * f3:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys

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

if s == s[::-1]:
    if s2 == s2[::-1]:
        if s3 == s3[::-1]:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()
    N = len(S)

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

    return


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
l = len(S)
T = ''.join(list(reversed(S)))

a = S[:(l-1)//2]
a1 = ''.join(list(reversed(a)))

b = S[(l+3)//2-1:l]
b1 = ''.join(list(reversed(b)))

if S == T:
    if a == a1 and b == b1:
        print('Yes')
    if a != a1 or b != b1:
        print('No')
if S != T:
    print('No')

Solution (Python):
S = input()

def iskai(s):
  result=False
  if s == s[::-1]:
    result=True
  return(result)

ans = 'No'
hf = len(S)//2 + 1

if iskai(S) and iskai(S[:hf-1]) and iskai(S[hf:]):
  ans = 'Yes'
  
print(ans)

Solution (Python):
s = input()
n = len(s)
sd = s[::-1]
a = s[:int((n-1)/2)]
ad = a[::-1]
b = s[int((n+3)/2-1):]
bd = b[::-1]
if s == sd and a == ad and b == bd:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
def palindrome(S):
  for i in range(len(S)//2):

    if S[i] != S[-(i+1)]:
      return 0
  return 1
ans = "No"
S = input()
S1 = S[:(len(S)-1)//2]
S2 = S[(len(S)+1)//2:]




if palindrome(S) == 1:
  if palindrome(S1) == 1:
    if palindrome(S2) == 1:
      ans = "Yes"
print(ans)

Solution (Python):
S = input()

def is_kaibun(s):
    return s[:len(s)//2] == s[:(len(s)-1)//2:-1]

flg = is_kaibun(S) and is_kaibun(S[:len(S)//2]) and is_kaibun(S[:len(S)//2:-1])

print('Yes' if flg else '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):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

s = input().rstrip()
n = len(s)

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

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

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

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

Solution (Python):
s = list(input())
n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

judge = 1

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

if judge == 0:
  print('No')
else:
  al = s[:a]
  bl = s[b - 1:]
  for j in range(a // 2):
    if al[j] != al[-(j + 1)]:
      judge = 0
      break
  if judge == 0:
    print('No')
  else:
    for k in range((n - b) // 2):
      if bl[k] != bl[-(k + 1)]:
        judge = 0
        break
    if judge == 0:
      print('No')
    else:
      print('Yes')

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

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

Solution (Python):
s = input()
flag = 0
sr = s[-1::-1]
if sr == s:
    flag+=1
s1 = s[:(len(s)-1)//2]
s1r = s1[-1::-1]
if s1 == s1r:
    flag += 1
s2 = s[(len(s)+3)//2-1:]
s2r = s2[-1::-1]
if s2 == s2r:
    flag+=1
print('Yes' if flag == 3 else 'No')

Solution (Python):
import sys

S=input()
N=len(S)
if S!=S[::-1]:
  print("No")
  sys.exit(0)
check=S[0:int((N-1)/2)]

if check!=check[::-1]:
  print("No")
  sys.exit(0)
check=S[int((N+3)/2)-1:N]

if check!=check[::-1]:
  print("No")
  sys.exit(0)
print("Yes")

Solution (Python):
string = input()
mid = len(string)//2

gnirts = string[::-1]
if(string != gnirts or string[:mid] != gnirts[mid+1:] or string[mid+1:] != gnirts[:mid]):
  print("No")
  exit()
print("Yes")

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

Solution (Python):
s = input()

s = list(s)
s1 = s[0:len(s)//2]
s2 = s[len(s)//2+1:len(s)]
if ("".join(s1) == "".join(s2)) :
  print("Yes")
else :    
  print("No")

Solution (Python):
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+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[:(N-1)//2]
S2 = S[(N+1)//2:]

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

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

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

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

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

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

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

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

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

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

Solution (Python):
S = str(input())
if len(S) % 4 == 1:
    m = len(S) // 4
    for i in range(m):
        if (S[i] != S[2 * m - i - 1] or
            S[2 * m - i - 1] != S[2 * m + 1 + i] or
            S[2 * m + 1 + i] != S[4 * m - i]):
            print('No')
            exit()    
else:
    m = len(S) // 4 + 1
    for i in range(m - 1):
        if (S[i] != S[2 * m - i - 2] or
            S[2 * m - i - 2] != S[2 * m + i] or
            S[2 * m + i] != S[4 * m - i - 2]):
            print('No')
            exit()
    if S[m - 1] != S[3 * m - 1]:
        print('No')
        exit()
print('Yes')

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

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

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

Solution (Python):
import sys
s = input()
pre = []
back = []
for i in range((len(s)-1)//2):
    pre.append(s[i])
s1 = ''.join(pre)

for i in range((len(s)+3)//2-1,len(s)):
    back.append(s[i])
s2 = ''.join(back)

if s != s[::-1]:
    print('No')
    sys.exit()
elif s1 != s1[::-1]:
    print('No')
    sys.exit()
elif s2 != s2[::-1]:
    print('No')
    sys.exit()
print('Yes')

Solution (Python):
S = input()

flag = 0
N = len(S)

s1 = int((N-1)/2)
s2 = int((N+3)/2)


if S[0:s1] == S[s1+1:]:
  flag = 1
else:
  flag = 0    

if S[s2-1:] == S[:s2-2]:
  flag = 1
else:
  flag = 0
  
if flag == 1:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
import sys






def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))




def main():
	s=input()
	n=len(s)
	ans="Yes"

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

	print(ans)

if __name__ == "__main__":
	main()

Solution (Python):
s = input()

n = len(s)
i = int((n-1)/2)
t = s[:i]
ii = int((n+3)/2-1)
u = s[ii:]

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

Solution (Python):
s = input()
c = int((len(s) - 1)/2)
ans = (list(s) == list(reversed(s)) and list(s[:c]) == list(reversed(s[:c])) and list(s[(c+1):]) == list(reversed(s[(c+1):])))
print(["No", "Yes"][ans])

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

flag = True
N = len(S)

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

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

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

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

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
S = input()
ln = len(S)
if S == S[::-1]:
    if S[:(ln-1)//2] == S[:(ln-1)//2][::-1]:
        if S[(ln+3)//2 - 1:] == S[(ln+3)//2 - 1:][::-1]:
            print('Yes')
            exit()
print('No')

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

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

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

Solution (Python):
def main():
    S = str(input())
    n = len(S)
    frontN = (n - 1) // 2
    backN = (n + 3) // 2
    
    checkFN = frontN // 2
    checkFNW = S[0:frontN]
    for i in range(checkFN):
        temp = (i + 1) * -1
        if checkFNW[i] == checkFNW[temp]:
            continue
        else:
            print('No')
            return
    
    checkBN = n - backN
    checkBNW = S[backN - 1:n]
    for i in range(checkBN // 2):
        temp = (i + 1) * -1
        if checkBNW[i] == checkBNW[temp]:
            continue
        else:
            print('No')
            return

    for i in range(n // 2):
        temp = (i + 1) * -1
        if S[i] == S[temp]:
            continue
        else:
            print('No')
            return
    
    print('Yes')
main()

Solution (Python):
s=input()

sr=s[::-1]

slen=len(s)

s1=(slen-1)//2 
s2=(slen+1)//2 

s1s=s[0:s1]
s1sr=s1s[::-1]
s2s=s[s2::]
s2sr=s2s[::-1]

if s==sr:
    if s1s==s1sr and s2s==s2sr:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s=input()


def kaibun(x):
    ans=1
    for i in range(len(x)//2):
        if x[i]!=x[-i-1]:
            ans=0
            break
    return ans
n=len(s)
a1=kaibun(s)
a2=kaibun(s[0:(n-1)//2])
a3=kaibun(s[-1+(n+3)//2:n])

if a1==1 and a2==1 and a3==1:
    print("Yes")
else:
    print("No")

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

Solution (Python):
def palin(x):
    
    if x == x[::-1]: return True
    return False
 
a = input()
n = len(a)
if palin(a) and palin(a[:int((n-1)/2)]) and palin(a[int((n+3)/2)-1:]):
    print("Yes")
else: print("No")

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

one = S[:(N-1) // 2]
two = S[(N+3) // 2 - 1:]

if S == S[::-1]:
    if one == one[::-1]:
        if two == two[::-1]:
            print('Yes')
            exit()

print('No')

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

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

if S == S[::-1]:
    if one == one[::-1]:
        if two == two[::-1]:
            print('Yes')
            exit()

print('No')

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

Solution (Python):
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

s = S()
N = len(s)
if s != s[::-1]:
    print("No")
else:
    ss = s[:(N-1)//2]
    if ss != ss[::-1]:
        print("No")
    else:
        sss = s[((N+3)//2)-1:]
        if sss != sss[::-1]:
            print("No")
        else:
            print("Yes")

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

if not S == S[::-1]:
    print('No')
    exit()

end = (n-1)//2
SS = S[:end]

if not SS == SS[::-1]:
    print('No')
    exit()

start = (n+3)//2 - 1
SSS = S[start:n]

if not SSS == SSS[::-1]:
    print('No')
    exit()

print('Yes')

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

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

POS = int((N-1)/2)
S1 = S[0:POS]
POS = int((N+3)/2)
S2 = S[POS-1:N]

if check(S) == False or check(S1) == False or check(S2) == False:
    print('No')
else:
    print('Yes')

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