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 math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
from operator import itemgetter





sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

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

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

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

for i in range(m):
  
  if s[i]!=s[-i-1]:
    print('No')
    exit()
if m%2==1: l=(m-1)//2
else: l=m//2
for i in range(l):
  
  if t[i]!=t[-i-1]:
    print('No')
    exit()
print('Yes')

Solution (Python):
S = input()

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

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

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

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

Solution (Python):
S=input()
N=len(S)
SS=S[0:(N-1)//2]
SSS=S[(N+1)//2:N+1]

for i in range((N-1)//2):
  if S[i]!=S[-1-i]:print('No');exit()
  if SS[i]!=SS[-1-i]:print('No');exit()
  if SSS[i]!=SSS[-1-i]:print('No');exit()
print('Yes')

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

Solution (Python):
def sep():
    return map(int,input().strip().split(" "))
def lis():
    return list(sep())

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

Solution (Python):
s = input()
n = len(s)
flag = False
 
 
def palind(S):
    size = len(S)
    for i in range(size//2):
        if S[i] != S[-1-i]:
            return False
    return True
 
 
 
if palind(s):
    m = (n-1)//2
    sb = s[:m]
    if palind(sb):
        sa = s[m+1:]
        flag = palind(sa)
 
print("Yes" if flag else "No")

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


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



if palind(s):
    m = (n-1)//2
    sb = s[:m]
    if palind(sb):
        sa = s[m+1:]
        flag = palind(sa)

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

Solution (Python):
S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2:]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
string=input()
palindrome=False
palin1=False

def palin(string):
    palindrome=False
    if string==string[::-1]:
        palindrome=True
    return palindrome

palindrome=palin(string)

if palin(string[int((len(string)-1)/2)])==True and palindrome==True:
    palin1=True
if palin(string[int((len(string)+3)/2)-1:len(string)])==True and palin1==True:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()
if 4 < len(s) < 6:
  print('No')
  exit()

if s[::-1] != s:
  print('No')
  exit()
s = s[:len(s)//2]
if s[::-1] != s:
  print('No')
  exit()
print('Yes')

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

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

Solution (Python):
s = input()


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


s_pali = is_palinedrome(s)
sub_pali_left = is_palinedrome(s[:len(s)//2])
sub_pali_right = is_palinedrome(s[len(s)//2+1:])

if s_pali and sub_pali_left and sub_pali_right:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
s = list(input())
b = 0
if len(s)%2==1:
    for a in range(int((len(s)-1)/2)):
        if s[a]!=s[len(s)-a-1] and b==0:
            b = 1
else:
    b = 1
if b == 0:
    for c in range(int((len(s)-1)/4+1)):
        if s[c]==s[int((len(s)-1)/2-c-1)]==s[int((len(s)+1)/2+c)]==s[len(s)-c-1] and b==0:
            b = 0
        else:
            b = 1
if b == 0:
    print("Yes")
elif b == 1:
    print("No")

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

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

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

Solution (Python):
s = input()
a = int((len(s)-1)/2)
b = int((len(s)+3)/2)
r = ''.join(reversed(s[b-1:]))
if s[:a]== s[:a:-1] and s[b-1:]== r:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):

S = input()
N = len(S)
Sf = S[0:(N-1)//2]
NSf = len(Sf)
Sb = S[(N+3)//2 -1:N+1]
NSb = len(Sb)
ans = 0

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

for i in range(NSf//2):
    if Sf[i:i+1] != Sf[NSf-1-i:NSf-i]:
        ans = 1
        
for i in range(NSb//2):
    if Sb[i:i+1] != Sb[NSb-1-i:NSb-i]:
        ans = 1
        
print('Yes') if ans == 0 else print('No')

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

S2 = S1[::-1]

a = S1 == S2

S3 = S1[:int((N - 1) / 2)]
S4 = S3[::-1]

b = S3 == S4

S5 = S1[int((N + 3) / 2) - 1:]
S6 = S5[::-1]

c = S5 == S6

if a and b and c:
    print('Yes')

else:
    print('No')

Solution (Python):
s = input()
l = len(s)
okey = 1
ll = l//2

for i in range(0,l//2):
    if s[i] != s[l-i-1]:
        okey = 0
        break

if okey == 1: 
    for i in range(0,ll//2):
        if s[i] != s[ll-i-1]:
            okey = 0
            break

if okey == 1:
    for i in range(ll+1, ll+ll//2):
        if s[i] != s[l-i-1]:
            okey = 0
            break

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

Solution (Python):
S = str(input())
N = len(S)
sList = [str(s) for s in S]
isPalindrome = 1
str1 = ''
str2 = ''
str3 = ''
str4 = ''

for i in range(N):
  if (sList[i] != sList[N - 1 - i]):
    isPalindrome = 0
if isPalindrome == 1:
  for i in range(int((N - 1) / 2)):
    str1 += sList[i]
    str2 += sList[int((N - 1) / 2 - 1 - i)]
    str3 += sList[int((N + 3) / 2 - 1 + i)]
    str4 += sList[N - 1 - i]
    
    if str1 != str2:
      isPalindrome = 0
    if str3 != str4:
      isPalindrome = 0
if isPalindrome == 0:
  print('No')
else:
  print('Yes')

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

if s1 == s2 == s3:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    S = input()

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

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

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

    print("Yes")


main()

Solution (Python):
S = input()
flag = 0
for i in range(0,len(S)//2):
    if S[i] == S[-1-i]:
        continue
    else:
        flag = 1
        print("No")
        break
if flag == 0:
    S = S[:((len(S)-1)//2)]
    for i in range(0,len(S)//2):
        if S[i] == S[-1-i]:
            continue
        else:
            flag = 1
            print("No")
            break
if flag == 0:
    print("Yes")

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

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

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()
N=len(S)
s=''.join(list(reversed(S)))

T=S[0:int((N-1)/2)]
NT=len(T)
t=''.join(list(reversed(T)))

U=S[int((N+1)/2):N]
NU=len(U)
u=''.join(list(reversed(U)))

if S[0:int((N-1)/2)] == s[0:int((N-1)/2)] and T == t and U == u:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()







Skai1 = S[0:(len(S)-1)//2]
Skai1 = Skai1[::-1]
Skai2 = S[((len(S)+3)//2)-1:len(S)]
Skai2 = Skai2[::-1]

if S==S[::-1] and S[0:(len(S)-1)//2] ==Skai1 and S[((len(S)+3)//2)-1:len(S)] == Skai2: 
  print('Yes')
else:
  print("No")

Solution (Python):
N = str(input())
lenN = len(N)

fN =N[0:(lenN - 1)//2]
lN =N[(lenN + 3)//2-1:]
print(("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]*(0,1)[lN == fN]])

Solution (Python):
S=input()
rS=S[::-1]

le=len(S)
cent=int((le+1)/2)

S1=S[0:cent-1]
S2=S[cent:]
rS1=S1[::-1]
rS2=S2[::-1]

if S==rS and S1==rS1 and S2==rS2:
  print("Yes")
else:
  print("No")

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

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

a = int((n-1)/2)
b = int((n+3)/2)

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

Solution (Python):
S = input()
N = len(S)
def is_palindrome(s):
    return s == ''.join(list(reversed(s)))

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

Solution (Python):

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

Solution (Python):
S = str(input())
s = list(map(str, S))
N = len(s)
t = 0
for i in range(int((N-1)/2)):
    if s[i] != s[N-i-1]:
        t += 1
        break
for i in range(int((N-1)/4)):
    if s[i] != s[int((N-1)/2) - i - 1]:
        t += 1
        break

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

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

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

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

Solution (Python):
kaibunkai = input()
n = len(kaibunkai)
zenhan = kaibunkai[:(n-1)//2]
kouhan = kaibunkai[(n+3)//2-1:]


def kaibun_desuka(bun):
  s = len(bun)
  for x in range(s//2):
    if bun[x] != bun[-x-1]:
      return False
  return True

if kaibun_desuka(kaibunkai) and kaibun_desuka(zenhan) and kaibun_desuka(kouhan):
  print("Yes")

  
else:
  print("No")

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

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

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

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

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

Solution (Python):
def main():
    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')


if __name__ == '__main__':
    main()

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


S = input()
n = len(S)

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

if check(S) and check(S1) and check(S2):
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
N=len(S)
def isPalindrome(s):
  n = len(s)
  flag=True
  slist=list(s)
  for i, c in enumerate(slist):
    if c!=slist[n-1-i]:
      flag=False
    if i > n-i:
      break
  return flag

Slist=list(S)

if isPalindrome(S) and \
   isPalindrome(Slist[0:int((N-1)/2)]) and \
   isPalindrome(Slist[int((N+3)/2)-1:N]):
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
s = input()
num = len(s)
n1 = s[0:(num-1) // 2]
n2 = s[(len(s)+3) // 2-1:]

if s == s[::-1] and n1 == n1[::-1] and n2 == n2[::-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):
s = input()
l = len(s)

def check(a):
  n = len(a)
  if n % 2 == 0:
    for i in range(n//2):
      if a[i] != a[n-i-1]:
        return False
    return True
  else:
    for i in range((n-1)//2):
      if a[i] != a[n-i-1]:
        return False
    return True

res = "No"
if check(s):
  
  if check(s[:(l-1)//2]):
    if check(s[(l+3)//2 - 1:]):
      res = "Yes"

print(res)

Solution (Python):
kai = input()
num = len(kai)

ans = 0

n1 = int((num-1) / 2)

for i in range(n1):
    if kai[i] != kai[-1*(i+1)]:
        ans += 1

l1 = kai[0:n1]

for i in range(len(l1)):
    if l1[i] != l1[-1*(i+1)]:
        ans += 1

l2 = kai[n1+1:]

for i in range(len(l2)):
    if l2[i] != l2[-1*(i+1)]:
        ans += 1

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

else:
    print("No")

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

Solution (Python):

def main():
    s = input()
    n = len(s)
    for i in range(n//2):
        if s[i] != s[n-1-i]:
            print("No")
            return
    s1 = s[:(n-1)//2]
    s2 = s[(n+3)//2-1:]
    n1 = len(s1)
    for i in range(n//4):
        if s1[i] != s[n1-1-i]:
            print("No")
            return
        if s2[i] != s[n1-1-i]:
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main()

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

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

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

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

def palindrome(string):
  return 0 if string==string[::-1] else 1

ls1 = S[0:int((N-1)/2)]
ls2 = S[int((N+3)/2-1):N]





if palindrome(S) == palindrome(ls1) == palindrome(ls2) == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
S = list(input())
k = (len(S) -1) // 2 
T = S[0:k]

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

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

for i in range(n):
    if s[i]!=r[i]:
        print('No')
        sys.exit()

s1=s[:]

del s1[(n-1)//2:]
r1=list(reversed(s1))

for i in range(len(s1)):
    if s1[i]!=r1[i]:
        print('No')
        sys.exit()

s2=s[:]

del s2[:(n+3)//2-1]
r2=list(reversed(s2))

for i in range(len(s2)):
    if s2[i]!=r2[i]:
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
n = len(s)
ans = 'Yes'
if s != s[::-1]:
    ans = 'No'
x = math.floor(n/2)
y = math.ceil(n/2)
a = s[0:x]
b = s[y:]
if a != a[::-1] or b != b[::-1]:
    ans = 'No'
print(ans)

Solution (Python):


def is_kaibun(string):

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


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

Solution (Python):
s = input()

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

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

Solution (Python):
S = input()
l = len(S) // 2
ll = l // 2
former = S[:l]
latter = S[l+1:]

for i in range(l):
  if S[i] != S[-i-1]:
    print("No")
    break
else:
  for i in range(ll):
    if former[i] != former[-i-1] or latter[i] != latter[-i-1]:
      print("No")
      break
  else:
    print("Yes")

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

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

else:
    print('No')

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

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


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

elif s[:(n-1)//2] != s[:(n-1)//2][::-1]:
    print('No')

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

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

Solution (Python):
s = input()
target = s[:(len(s)-1)//2]
target2 = s[(len(s)+3)//2-1:]
if target == target2:
    l, r = 0, len(s)-1
    flag = True
    while l <= r:
        if s[l] == s[r]:
            l += 1
            r -= 1
        else:
            print('No')
            exit(0)

    print("Yes")


else:
    print('No')

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

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

S_1=S[:N//2]
S_2=S[N//2+1:]

N_=len(S_1)
ans='Yes'
for n in range(N_):
    if S_1[n] != S_1[-(n+1)]:
        ans='No'
        break
    if S_2[n] != S_2[-(n+1)]:
        ans='No'
        break   
        
for n in range(N):
    if S[n] != S[-(n+1)]:
        ans='No'
        break

print(ans)

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

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

Solution (Python):
s=input()

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

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

def judge(arr):
  l = len(arr)
  if len(arr) % 2 != 0:
    l = len(arr)
  for i in range(int(l/2)):
    if arr[i] != arr[l-1-i]:
      print("No")
      exit()
      
judge(S)
center = int((l-1)/2)
judge(S[0:center])
judge(S[center+1:])
print("Yes")

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

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

Solution (Python):
S = input()

N = len(S)
ans = 'No'


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

Solution (Python):
def isKaibun(ss):    
    return ss==ss[::-1]

s = input()
ans=True
n=len(s)

if not isKaibun(s):
    ans=False
if not isKaibun(s[:((n-1)//2)]):
    ans=False

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

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

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

if check(s) and check(s1) and check(s2):
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

N = len(S)

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

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


if check(S) and check(S1) and check(S2):
    print("Yes")
else:
    print("No")

Solution (Python):

S=input()

N=len(S)
con_2=S[:(N-1)//2]
con_3=S[((N+3)//2-1):]

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

Solution (Python):
S = input()

N = len(S)//2

print('Yes' if S[:N] == S[-N:] else 'No')

Solution (Python):
S=list(input())
N=len(S)
x=0
for i in range(int((N-1)/2)):
    if S[i]!=S[-(i+1)]:
        print("No")
        break
    elif i==int((N-1)/2)-1:
        x+=1
import math
if x==1:
    S_l=S[:int((N-1)/2)]
    for i in range(int(math.ceil(len(S_l)/2))):
        if S_l[i]!=S_l[-(i+1)]:
            print("No")
            break
        elif i==int(math.ceil(len(S_l)/2))-1:
            x+=1
if x==2:
    S_m=S[int((N+3)/2)-1:N]
    for i in range(int(math.ceil(len(S_m)/2))):
        if S_m[i]!=S_m[-(i+1)]:
            print("No")
            break
        elif i==int(math.ceil(len(S_m)/2))-1:
            print("Yes")

Solution (Python):
s=list(input())
n=len(s)
if list(s[::-1])==list(s[:]) and list(s[(n-1)//2-1::-1])==list(s[:(n-1)//2]) and list(s[:(n+3)//2-2:-1])==list(s[(n+3)//2-1:]):
    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][::-1] and S[(N - 1) // 2 + 1:] == S[(N - 1) // 2 + 1:][::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

n = len(s)
list_s = list(s)
list_s_part1 = list_s[0:(n - 1) // 2]
list_s_part2 = list_s[(n + 1) // 2:n]

list_s_rev = list(reversed(list_s))
list_s_part1_rev = list(reversed(list_s_part1))
list_s_part2_rev = list(reversed(list_s_part2))
if ''.join(list_s) == ''.join(list_s_rev) and\
    ''.join(list_s_part1) == ''.join(list_s_part1_rev) and\
    ''.join(list_s_part2) == ''.join(list_s_part2_rev):
    print('Yes')
else: print('No')

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

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

S=input()
if kaibun(S):
    a=S[0:int(len(S)/2)]
    b=S[int(len(S)/2)+1:len(S)]
    if kaibun(a) and kaibun(b):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
s = list(input())
n = len(s)
m = n//2
s_f = []
s_l = []
for i in range(m):
    s_f.append(s[i])
for i in range(1,m + 1):
    s_l.append(s[-i])
s_r = list(reversed(s))
s_f_r = list(reversed(s_f))
s_l_r = list(reversed(s_l))
if s_r == s:
    if s_f_r == s_f and s_l_r == s_l:
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

    rule1 = True
    rule2 = True
    rule3 = True

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

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

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

    if rule1 and rule2 and rule3:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
s = list(input())
if s == list(reversed(s)) and s[:len(s)//2] == list(reversed(s[:len(s)//2])):
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
new_S1=list(reversed(S))
new_S2=''.join(new_S1)
if S==new_S2:
    A=S[0:len(S)//2]
    new_A1 = list(reversed(A))
    new_A2 = ''.join(new_A1)
    B=S[len(S)//2+1:len(S)]
    new_B1 = list(reversed(B))
    new_B2 = ''.join(new_B1)
    if A==new_A2 and B==new_B2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)



s=input()


n=len(s)

if pall(s,n):
	print("Yes")
else:
	print("No")

Solution (Python):
S = input()

S_list = list(S)
N = len(S_list)

no_flag = 0

for i in range(N//2):
    if S_list[i] != S_list[N-i-1]:
        no_flag = 1

for i in range(int((N-1)/2)//2):
    
    if S_list[i] != S_list[(N-1)//2-i-1]:
        no_flag = 1

for i in range((N-3)//2):
    
    if S_list[(N+3)//2+i-1] != S_list[N-1-i]:
        no_flag = 1

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

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

Solution (Python):
def check(r):
    if r == r[::-1]:
        return True


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


if __name__ == "__main__":
    main()

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


def check(r):
    if r == r[::-1]:
        return True


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

Solution (Python):
import sys
read = sys.stdin.buffer.read
s = read().decode("utf-8")
H = s[:(len(s) - 1) // 2]
B = s[(len(s) - 1) // 2 + 1:-1]

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

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

count=0
for i in range(n//2):
    if s[i]==s[-(i+1)]:
        count+=1
for i in range((n-1)//2):
    if s2[i]==s2[-(i+1)]:
        count+=1
for i in range(n-(n+3)//2+1):
    if s3[i]==s3[-(i+1)]:
        count+=1

if count==n//2+(n-1)//2+n-(n+3)//2+1:
    print("Yes")
else:
    print("No")

Solution (Python):

def solve():
	s=input()
	if(len(s)%2==0):
		print("No")
		return 
	else :
		n=len(s)//2
		str1=s[:n]
		str2=s[n+1:]
		
		if(str1==str2):
			print("Yes")
		else:
			print("No")
if __name__ == "__main__":
	solve()

Solution (Python):
import sys
S=list(input())
reverse_S = S[::-1]

if S==reverse_S:
    for i in range(int(len(S)/2)):
        if S[i]==S[int(len(S)/2)-i-1] and S[int(len(S)/2)+1+i]==S[len(S)-1-i]:
            continue
        else:
            print("No")
            sys.exit()
    print("Yes")
else:
    print("No")

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

Solution (Python):
S=input()
N=len(S)
r_S=S[::-1]
c1=int((N-1)/2)
c2=int((N+3)/2)
S1=S[:c1]
r_S1=S1[::-1]
S2=S[(c2-1):]
r_S2=S2[::-1]



if S==r_S and S1==r_S1 and S2==r_S2:
  print("Yes")
else:
  print("No")

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


if '__main__' == __name__:
    resolve()

Solution (Python):
S = input()
N = len(S)
reverse = S[::-1]
first = S[:(N - 1) // 2]
second = S[(N + 1) // 2:]

if S == reverse and first == second:
    print("Yes")
else:
    print("No")

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

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

first = S[:(length - 1) // 2]
second = S[(length + 1) // 2:]



if check_palin(S) and check_palin(first) and check_palin(second):
    print("Yes")
else:
    print("No")

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

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

def rule2():
  s = S[:(N-1)//2]
  return s==s[::-1]

def rule3():
  s = S[(N+3)//2-1:]
  return s==s[::-1]  

print ('Yes' if rule1() and rule2() and rule3() else 'No')

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

f1 = s == list(reversed(s))
f2 = s[:(len(s)-1)//2] == list(reversed(s[:(len(s)-1)//2]))
f3 = s[(len(s)+2)//2:] == list(reversed(s[(len(s)+2)//2:]))
print("Yes" if all([f1, f2, f3]) else "No")

Solution (Python):
S = input()

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

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

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