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

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

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

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

Solution (Python):
def solve(string):
    n = len(string)
    pre, post = string[:(n - 1) // 2], string[(n + 3) // 2 - 1:]
    return "Yes" if string == string[::-1] and pre == pre[::-1] and post == post[::-1] else "No"


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Solution (Python):
str1 = input()
n = len(str1)
m = int((n-1)/2)
o = int((n+3)/2)
str2 = str1[:m]
str3 = str1[(o-1):n]
if str1 != str1[::-1]:
	print("No")
else:
    if str2 != str2[::-1]:
	    print("No")
    else:   
        if str3 != str3[::-1]:
            print("No")
        else:
            print("Yes")

Solution (Python):
str1 = input()
n = len(str1)
m = int((n-1)/2)
o = int((n+3)/2)
str2 = str1[:m]
str3 = str1[(o-1):n]
if str1 != str1[::-1]:
	print("No")
else:
    if str2 != str2[::-1]:
	    print("No")
    else:   
        if str3 != str3[::-1]:
            print("No")
        else:
            print("Yes")

Solution (Python):
S = list(input())
S_len = len(S)
S_reverse = list(S[::-1])

ans = 'Yes'


if S == S_reverse:
    pass
else:
    ans = 'No'


S_2 = S[0:(S_len - 1) // 2]
S_2_reverse = S_2[::-1]
if S_2 == S_2_reverse:
    pass
else:
    ans = 'No'


S_3 = S[(S_len + 3) // 2 - 1:]
S_3_reverse = S_3[::-1]
if S_3 == S_3_reverse:
    pass
else:
    ans = 'No'
 
print(ans)

Solution (Python):








S = input()

N = len(S)

if S == S[::-1] and S[0:int((N-1)/2)] == S[0:int((N-1)/2)][::-1] and S[int((N+3)/2-1):N] == S[int((N+3)/2-1):N][::-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):
import math
s = input()

n = len(s)

def is_kaibun(s):
    n = len(s)
    h = s[0:math.ceil((n-1)/2)]
    t =  s[(n+3)//2-1:n]
    
    return h == t[::-1]

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

if is_kaibun(s) and is_kaibun(h) and is_kaibun(t):
    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):
def iskai(tS):
    test = list(tS)
    testr = reversed(test)
    for i, j in zip(test, testr):
        if i != j:
            return False
            break
    else:
        return True
        


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

Solution (Python):
s = list(input())
f = True
for i in range(len(s) - 1):
    if s[i] == s[-1 - i]:
        pass
    else:
        f = False
ss = [s[i] for i in range((len(s) - 1) // 2)]
for i in range(len(ss) // 2):
    if ss[i] == s[-1 - i]:
        pass
    else:
        f = False
sss = [s[i] for i in range((len(s) + 3) // 2 - 1, len(s))]
for i in range(len(sss) // 2):
    if sss[i] == s[-1 - i]:
        pass
    else:
        f = False
if f:
    print("Yes")
else:
    print("No")

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

S = input()

N = len(S)

def check_pai(s):
    reversed_s = s[::-1]
    return s == reversed_s

lS = S[:(N-1)//2]
rS = S[(N+1)//2:]

if check_pai(S) and check_pai(lS) and check_pai(rS):
    print("Yes")
else:
    print("No")

Solution (Python):

def is_palindrom(s, start=0, end=None):
    if end is None:
        end = len(s) - 1
    n = len(s[start:end+1])
    for i in range(n//2):
        if s[start+i] != s[end - i]:
            return False
    return True

def is_strong_palindrom(s):
    n = len(s)
    if not is_palindrom(s):
        print("No")
    elif not is_palindrom(s, 0, (n-1)//2 - 1):
        print("No")
    elif not is_palindrom(s, (n+3)//2 -1, n-1):
        print("No")
    else:
        print("Yes")
        
line = input()
is_strong_palindrom(line)

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

Solution (Python):
S = input()
sb = S[:(len(S) - 1) // 2]
sc = S[(len(S) + 3) //2 -1:]
a = S == "".join(reversed(S))
b = sb == "".join(reversed(sb))
c = sc == "".join(reversed(sc))
print("Yes" if a and b and c == True else "No")

Solution (Python):
s=input()
ans=1
n=len(s)
for i in range(len(s)//2):
  if s[i]!=s[len(s)-1-i]:
    ans=0
s1=s[:(n-1)//2]
for i in range(len(s1)//2):
  if s1[i]!=s1[len(s1)-1-i]:
    ans=0
s2=s[(n+3)//2-1:]
for i in range(len(s2)//2):
  if s2[i]!=s2[len(s2)-1-i]:
    ans=0

print("YNeos"[1-ans::2])

Solution (Python):
S = input()
N = len(S)
def is_pali(s):
    for ind, i in enumerate(s[:len(s)//2]):
        if(i==s[-ind-1]):
            continue
        else:
            return False
    return True

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

Solution (Python):
def check(s):
    if len(s) % 2 == 0:
        L = len(s)//2
        head=s[:L]
        tale=s[L:]
    else:
        L = (len(s)-1)//2
        head = s[:L]
        tale = s[L+1:]
    if head == tale[::-1]:
        return True
    return False
s = input()
if not check(s):
    print("No")
elif not check(s[:(len(s)-1)//2]):
    print("No")
elif not check(s[(len(s)+3)//2-1:]):
    print("No")
else:
    print("Yes")

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

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

Solution (Python):
S1 = input()
N1 = len(S1)
S2 = S1[:(N1-1)//2]
S3 = S1[(N1+3)-1//2:]
N2 = len(S2)
N3 = len(S3)
flag1 = True
flag2 = True
flag3 = True

for i in range(N1//2):
    if S1[i] != S1[-1-i]:
        flag1 = False
        break

for i in range(N2//2):
    if S2[i] != S2[-1-i]:
        flag2 = False
        break

for i in range(N3//2):
    if S3[i] != S3[-1-i]:
        flag3 = False
        break

print("Yes" if flag1 and flag2 and flag3 else "No")

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

Solution (Python):
S=list(input())
N2=((int(len(S))//2))
SS=S[0:N2]
A=0
B=-1

while SS[A]==SS[B]:
    A+=1
    B-=1
    if A>int(len(SS)//2):
        break

X=tuple(SS)
Y=tuple(S[N2+1:])
if A!=0 and X==Y:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
S = input()
ans = True
def isP(s):
    return s == s[::-1]

if not isP(S):
    ans = False
if not isP(S[:(len(S)//2)]):
    ans = False

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

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

def isKaibun(s):
    i = 0
    l = len(s)
    flag = 1
    while 1:
        if s[i]==s[l-1-i]:
            i+=1
        else:
            flag=0
            break
        if l-1-i<i:
            break
    return flag

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

Solution (Python):
import sys

s = input()
revs = ''.join(list(reversed(s)))
n = len(s)

if s == revs:
    revs = ''.join(list(reversed(s[:(n)//2])))
    if s[:(n)//2] == revs:
        revs = ''.join(list(reversed(s[(n+2)//2:])))
        if s[(n+2)//2:] == revs:
            print("Yes")
            sys.exit()
print("No")

Solution (Python):
import sys
s=input()
n=len(s)
s1=s[0:(n-1)//2]
s2=s[(n+1)//2:n]
if s1!=s2:
  print("No")
  sys.exit()
for i in range(0,len(s1)//2+1):
  if s1[i]!=s1[-i-1]:
    print("No: "+s1[i]+","+s1[-i-1])
    sys.exit()
print("Yes")

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

s0 = list(reversed(s))
s1 = list(reversed(s[:(n-1)//2]))
s2 = list(reversed(s[(n+1)//2:]))
if s == s0 and s[:(n-1)//2] == s1 and  s[(n+1)//2:] == s2:
    print('Yes')

else:
    print('No')

Solution (Python):
S=list(input())
N=len(S)
for i in range(N//2):
    if S[i]==S[N-1-i]:
        flag1=1
    else:
        flag1=0
        break
for i in range((N+1)//4):
    if S[i]==S[(N-3)//2-i]:
        flag2=1
    else:
        flag2=0
        break
for i in range((N+1)//2,N):
    if S[i]==S[(3*N-1)//2-i]:
        flag3=1
    else:
        flag3=0
        break
if flag1==1 and flag2==1 and flag3==1:
    print("Yes")
else:
    print("No")

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

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

l=(len(s)-1)//2
judge=1
for i in range(l):
    if s[i]==s[l-i-1] and s[l+i+1]==s[2*l-i] and s[i]==s[l+i+1]:
        pass
    else:
        judge=0
        break
if judge==1:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()
def ispalindrome(str): return 1 if str == str[::-1] else 0

n = len(s)
front = s[:(n-1)//2]
back = s[(n+3)//2-1:]

if ispalindrome(s) and ispalindrome(front) and ispalindrome(back):
    print('Yes')
else:
    print('No')

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

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

print(ans)

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

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

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

def is_kaibun(s):
    return list(s) == list(reversed(s))

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

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


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

sub_s = s[:(len(s)-1) // 2]

for i in range(len(sub_s)//2):
    if sub_s[i] == sub_s[-1-i]:
        pass
    else:
        flag = False

sub_s2 = s[(len(s)+3) // 2 - 1:]

for i in range(len(sub_s2)//2):
    if sub_s2[i] == sub_s2[-1-i]:
        pass
    else:
        flag = False

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

Solution (Python):


s = input()
n = len(s)
flag = False

def isKaibun (bun):
    rev = ''.join(list(reversed(bun)))
    f = False
    if rev == bun:
        f = True
    return f

s_sub_0 = s[ : int((n - 1) / 2)]
s_sub_1 = s[int((n + 3) / 2) - 1:]

if not isKaibun(s):
    flag = False
elif isKaibun(s_sub_0) and isKaibun(s_sub_1):
    flag = True

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

Solution (Python):
s = input()


m = int((len(s)-1)/2)


n = int((len(s)+3)/2)

s1 = s[:m]

s2 = s[n-1:]

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

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

Solution (Python):
S = input()
ch = list(S)
num = len(S)
n1 = int((num-1)/2)
result = str("Yes")
i = int(0)
j = int(0)
k = int(0)
while i < n1:
    if ch[i] == ch[n1-1-i]:
        i = i+1
    else:
        result = str("No")
        break
if result == "Yes":
    while j < n1:
        if ch[num - n1+j] == ch[num - j-1]:
            j = j+1
        else:
            result = str("No")
            break
if result == "Yes":
    while k < num:
        if ch[k] == ch[num-1-k]:
            k = k + 1
        else:
            result = str("No")
            break
print(result)

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

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

forward = s[:(n-1)//2]
back = s[(n+3)//2 - 1:]



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

Solution (Python):

s=input()
def kaibun(string):
    kj=True
    mid=len(string)//2
    for i in range(mid):
        if string[i]!=string[len(string)-1-i]:
            kj=False
            break
    return kj
x=(len(s)-1)//2
y=(len(s)+3)//2
if kaibun(s)==kaibun(s[:x])==kaibun(s[y-1:])==True:
     print("Yes")
else:
     print("No")

Solution (Python):

S = input()
Slist = list(S)
ans = 'Yes'
for k in range (int(len(Slist) / 2)):
    if Slist[k] != Slist[len(Slist) - k - 1]:
        ans = 'No'
N = len(Slist)
if ans == 'Yes':
    for k in range (int(int((N)/2)/2)):
        if Slist[k] != Slist[int((N-1)/2) - k - 1]:
            ans = 'No'
if ans == 'Yes':
    for k in range (int(int((N)/2)/2)):
        if Slist[N-k-1] != Slist[int((N+3)/2) + k - 1]:
            ans ='No'
print(ans)

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

Solution (Python):
S=input()
N=len(S)
list1=list(S)[::-1]

flag=True

if list(S)!=list1:
    flag=False

list2=list(S)[:(N-1)//2]
if list2!=list2[::-1]:
    flag=False

list3=list(S)[(N+3)//2-1:]
if list3!=list3[::-1]:
    flag=False

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

Solution (Python):
def pali (s):
    if(1):
        start=0
        end=len(s)-1
        while(start<end):
            if(s[start]!=s[end]):
                return 0
            start+=1
            end-=1
        return 1
s=input()
n=len(s)
s1=s[:(n-1)//2]
s2=s[(n+3)//2-1:]
if(pali(s)==1 and (pali(s1)==1 and pali(s2)==1)):
    print ('Yes')
else:
    print ('No')

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

Solution (Python):
def checkKaibun(str):
    for i in range(int(len(str) / 2)):
        if str[i] != str[-i - 1]:
            return False
    return True
 
s = input()
n = len(s)
c2e = int((n - 1) / 2)
c3s = int((n + 3) / 2) - 1
if not checkKaibun(s):
    print('No')
elif not checkKaibun(s[0:c2e]):
    print('No')
elif not checkKaibun(s[c3s:n]):
    print('No')
else :
    print('Yes')

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

Solution (Python):
S = input()


IsKaibun = 'No'

N = len(S)

def check_kaibun( mojiretu ):
    names = len(mojiretu)
    IsKaibunLocal = 'Yes'
    for name in range((names + 1) // 2):
        if mojiretu[name] != mojiretu[names - 1 - name]:
            IsKaibunLocal = 'No'

    return IsKaibunLocal


if N%2 != 1 and N < 3 and N >  99 :
    PRE_CHECK = 1


IsKaibun = check_kaibun(S)


if IsKaibun == 'Yes':
    IsKaibun =  check_kaibun(S[ 0 : int((N-1)/2) ])


if IsKaibun == 'Yes':
    IsKaibun = check_kaibun(S[ int((N+3)/2 - 1) : N ])


print(IsKaibun)

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):
word = input()

length = int((len(word) - 1) / 2)


def judge_a(kaibun):
    if kaibun == kaibun[::-1]:
        return True
    return False


def judge_b(kaibun):
    if kaibun[:length] == kaibun[length-1::-1]:
        return True
    return False


def judge_c(kaibun):
    if kaibun[length + 1:] == kaibun[:length:-1]:
        return True
    return False


if judge_a(word) == True:
    if judge_b(word) == True:
        if judge_c(word) == True:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s=str(input())
n=len(s)
ans=0
for i in range(int((n-1)/2)):
  if s[i]!=s[n-1-i]:
    ans+=1
    
nn=int((n-1)/2)
if nn//2==0:
  nna=int(nn/2)
else:
  nna=int((nn-1)/2)
for i in range(nna):
  if s[i]!=s[nn-1-i]:
    ans+=1
    
nnn=int((n+3)/2)
nnnn=n-nnn+1
if nnnn//2==0:
  nnb=int(nnnn/2)
else:
  nnb=int((nnnn-1)/2)
for i in range(nnnn):
  if s[nnn-1+i]!=s[n-1-i]:
    ans+=1
    
if ans==0:
  print("Yes")
else:
  print("No")

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

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

count = 0
S_bak = list(reversed(S))


if S == S_bak:
    count += 1
    

one = S[0:a]


one_bak = list(reversed(one))
if one == one_bak:
    count += 1
    

two = S[b-1:N]


two_bak = list(reversed(two))

if two == two_bak:
    count += 1
    

if count == 3:
    print("Yes")
else:
    print("No")

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

s1=s[:s_l//2]
s2=s[s_l//2+1:]

c=1

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

for i in range(len(s1)-1):
  if s1[i]!=s1[-1-i]:
    c=0
for i in range(len(s2)-1):
  if s2[i]!=s2[-1-i]:
    c=0

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

Solution (Python):
def String_palind(s):

    ans = "No"
    scount = int((len(s) - 1) / 2)
    ecount = int((len(s) + 3) / 2)
    slen = s[:scount]
    elen = s[ecount - 1:]

    if s == s[::-1] and slen == slen[::-1] and elen == elen[::-1]:
        ans = "Yes"

    return ans

def main():
    s = str(input())
    print(String_palind(s))

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
n=len(s)
str=s
str=str[::-1]
if(s!=str):
    print('No')
else:
    temp=(n-1)//2
    st=""
    for i in range(temp):
        st+=s[i]
    str1=st
    str1=str1[::-1]
    if(st!=str1):
        print('No')
    else:
        temp=(n+3)//2
        temp=temp-1
        st1=""
        for i in range(temp,n):
            st1+=s[i]
        str2=st1
        str2=str2[::-1]
        if(st1!=str2):
            print('No')
        else:
            print('Yes')

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

Solution (Python):


import sys


def IOE():
    sys.stdin = open("input.txt", "r")
    sys.stdout = open("output.txt", "w")


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


if __name__ == "__main__":
    
    main()

Solution (Python):
import math
s=list(input())
half_s=int((len(s)-1)/2)
def kaibun_hantei(p):
  half_l=math.ceil((len(p)-1)/2)
  if len(p)%2==1:
    if p[:half_l]==p[(half_l+1):][::-1]:
      return 100
  else:
    if p[:half_l]==p[(half_l):][::-1]:
      return 100

if kaibun_hantei(s)==100:
  if kaibun_hantei(s[:half_s])==100:
    print('Yes')
  else:
    print('No')
else:
  print('No')

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

def solve(s):
  return check(s) and check(s[:int((len(s)-1)/2)]) and check(s[int((len(s)+3)/2-1):])

S = input()

if solve(S):
  print('Yes')
else:
  print('No')

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

    return 1

s = input()
left = s[:((len(s)-1)//2)]
right = s[((len(s)+3)//2-1):]

if kaibun(s) == 1 and kaibun(left) == 1 and kaibun(right) == 1:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
def is_pal(s):
    if len(s) < 2:
        return True
    elif s[0] == s[-1]:
        return is_pal(s[1:-1])
    return False

s = input().strip()
ja = len(s)

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

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

Solution (Python):
s=str(input())
def isPalin(l,r):
  if l >= r:
    return True
  if s[l]!=s[r]:
    return False
  return isPalin(l+1,r-1)
n = len(s)
if isPalin(0,n-1) and isPalin(0,n//2-1) and isPalin(n//2+1,n-1):
  print('Yes')
else:
  print('No')

Solution (Python):
def kaibun(s):
    n = len(s)
    for i in range(n):
        if s[i]!=s[-1-i]:
            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):
def is_palindrome(s):
    l = len(s)
    return s[:l // 2] == s[l // 2 + l % 2:][::-1]


S = input()
L = len(S)

if is_palindrome(S) and is_palindrome(S[:L // 2]) and is_palindrome(S[L // 2 + 1:]):
    print("Yes")
else:
    print("No")

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

if s[0:math.floor(n/2)] != s[math.ceil(n/2):]:
  print('No')
  sys.exit()

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

print('Yes')

Solution (Python):

def Palindrome(S):
    if len(S)==1:
        return "Yes"
    for i in range(int((len(S))/2)):
        if S[i]==S[len(S)-i-1]:
            YorN="Yes"
        else:
            YorN="No"
            break
    return YorN
S = input()
Sl = list(S)
left = right = "No"
if Palindrome(Sl) == "Yes":
    middle=int((len(Sl)-1)/2)

    left  = Palindrome(Sl[:middle])
    right = Palindrome(Sl[middle+1:])
if left == "Yes" and right == "Yes":
    YorN = "Yes"
else:
    YorN = "No"
print(YorN)

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

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



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

c = S[(N+3)//2-1::]
d = c[::-1]

e = S
f = S[::-1]

if a == b and c ==d and e == f:
  print('Yes')
  
else:
  print('No')

Solution (Python):
s = input()

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

flag = True

if s != s[::-1]:
    flag = False
if s1 != s1[::-1]:
    flag = False

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

Solution (Python):
S=input()
def ispalindrome(str): return 1 if str == str[::-1] else 0
L=(len(S)-1)//2
T=S[:L]
U=S[L+1:]
if ispalindrome(S)==1 and ispalindrome(T)==1 and ispalindrome(U)==1:
    print("Yes")
else: print("No")

Solution (Python):
def check(s):
    n = len(s)
    if s != s[::-1]:
        return False
    t = s[:(n - 1) // 2]
    if t != t[::-1]:
        return False
    u = s[(n + 3) // 2 - 1:]
    if u != u[::-1]:
        return False
    return True


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

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

flag = True

if s != s[::-1]:
    flag = False
if s1 != s1[::-1]:
    flag = False
if s2 != s2[::-1]:
    flag = False
print("Yes") if flag else print("No")

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

def is_parin(s):
    return all((s[i]==s[len(s)-1-i] for i in range(len(s)//2)))

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

Solution (Python):
S = input()

N = len(S)

def check_kaibun(s) :
  l = len(s)
  half = int(l/2)
  for i in range(half) :
    if(s[i] != s[l-1-i]) :
      return False
      
  return True

first_s = S[:int((N-1)/2)]
second_s = S[int((N+3)/2-1):]
if ((check_kaibun(first_s)) and (check_kaibun(second_s)) and (first_s == second_s)) :
  print("Yes")
else :
  print("No")

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

Solution (Python):
X = input()
N = len(X)//2

if X==X[::-1] and X[:N]==X[-N:] :
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

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

def is_strong_palindrome(s):
  return is_palindrome(s) \
    and is_palindrome(s[:(len(s) - 1) // 2]) \
    and is_palindrome(s[(len(s) + 3) // 2 - 1:])

if is_strong_palindrome(S):
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()


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


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

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

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

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

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

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

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

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

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


for i in range(len(s1)):
  if s1[i] != t1[i] or s2[i] != t2[i]:
    flg = 1
    break
for i in range(n//2):
  if s[i] != s[-(i+1)]:
    flg = 1
    break
 
print("Yes" if flg == 0 else "No")

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

if s == "".join(list(reversed(s))) and s1 == "".join(list(reversed(s1))) and s2 == "".join(list(reversed(s2))):
    print("Yes")
else:
    print("No")

Solution (Python):



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

S = input()
mid = (len(S)-1)//2

if check(S[:mid]) and S[:mid] == S[mid+1:]:
    print('Yes')
else:
    print('No')

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


if S == list(reversed(S)):
  a = []
  b = []
  for i in range(int((N - 1) / 2)):
    a.append(S[i])
  for i in range(int((N + 3) / 2 - 1), N):
    b.append(S[i])

  if (a == list(reversed(a))) and (b == list(reversed(b))):
    print("Yes")
  else:
    print("No")
else:
  print("No")

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

Solution (Python):
s=input()

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

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


for i in range(N):
  if S[i]!=S[-i-1]:
    print("No");exit()
for i in range(N//2):
  if S_l[i]!=S_l[-i-1]:
    print("No");exit()
  if S_r[i]!=S_r[-i-1]:
    print("No");exit()
print("Yes")

Solution (Python):
def fin():
    print('No')
    quit()

input_line = input()
if not input_line == input_line[::-1]:
    fin()

N = len(input_line)
new_str = input_line[0:(N-1)//2]
if not new_str == new_str[::-1]:
    fin()

print('Yes')

Solution (Python):
s = input()
n = len(s)
cond1 = s == s[::-1]
s2 = s[0:(n-1)//2]
cond2 = s2 == s2[::-1]
s3 = s[(n+3)//2 - 1:]
cond3 = s3 == s3[::-1]
print('Yes' if cond1 and cond2 and cond3 else 'No')

Solution (Python):
def ispalindrome(s, b, e):
    i = b; j = e
    while i < j :
        if s[i] != s[j] :
            return False
        i += 1
        j -= 1
    return True
    
    
s = input()
n = len(s)
if ispalindrome(s,0,(n-3)//2) and ispalindrome(s,0,n-1) :
    print("Yes")
else:
    print("No")

Solution (Python):

q=input()
y=len(q)


u=((y-1)//2);
p=((y+3)//2)-1;

t=q[0:u]
r="".join(reversed(t))

i=q[p:]
o="".join(reversed(i))

a="".join(reversed(q))
if a==q and o==i and t==r:
       print("Yes")
else :
  print("No")

Solution (Python):
def strong(s,n):
    k=s[0:(n-1)//2 ]
    p=s[(n+3)//2 - 1:n]
    return s==s[::-1] and k==k[::-1] and p==p[::-1]
s=input()
n=len(s)
print("Yes" if strong(s,n) else "No")

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

sl = s[:length//2]
sr = s[length//2 + 1:]
if sl == sr and sr == sr[::-1]:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()
ps1 = s[:len(s)//2]
ps2 = s[(len(s)+2)//2:]

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