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):
n=input()
s=len(n)
d=int((s-1)/2)
p=int((s+3)/2)
m=n[::-1]
n1=n[0:d]
n2=n1[::-1]
n3=n[p-1:]
n4=n3[::-1]
if n==m and n1==n2 and n3==n4:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import sys
INF = 10 ** 9
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)

def k(s):
    n = len(s)
    flag = True
    if n%2 == 0:
        l = n//2
    else:
        l = (n - 1)//2

    for i in range(l):
        if s[i] == s[n-i-1]:
            continue
        else:
            flag = False
            break
    return flag


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

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


if __name__=='__main__':
    main()

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

Solution (Python):
S = input()
S_ar = S[::-1]
S_len = len(S)
a = (S_len-1)//2
b = (S_len+3)//2-1
S_a = S[0:a]
S_b = S[b:S_len]

if S == S_ar:
    if S_a == S_a[::-1]:
        if S_b == S_b[::-1]:
            print("Yes")
            exit()
print("No")

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

if __name__ == '__main__':
    main()

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

Solution (Python):
s = input()
n = len(s)
l_ = int((n-1)/2)
l = s[:l_]
lv = l[::-1]
r_ = int((n+3)/2)
r = s[r_-1:]
rv = r[::-1]
if l != rv or l != lv or r != rv:
    print("No")
    exit()
print("Yes")

Solution (Python):
import sys

S = input()
N = len(S)

if S != S[::-1]:
    print('No')
    sys.exit()

S1 = S[:int((N-1)/2)]
S2 = S[int((N+1)/2):]
if S1 != S1[::-1]:
    print('No')
    sys.exit()
if S2 != S2[::-1]:
    print('No')
    sys.exit()

print('Yes')

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





s=list(ss())
chk=True
if s!=list(reversed(s)):
    chk=False

if s[0:(len(s)-1)//2] != list(reversed(s[0:(len(s)-1)//2])):
    chk=False
if s[(len(s)+3)//2 -1:1+(len(s)-1)] != list(reversed(s[(len(s)+3)//2-1:1+(len(s)-1)])):
    chk=False
    
if chk==False:
    print("No")
else:
    print("Yes")

Solution (Python):
def is_kaibunn(word):
  new_word = ''.join(list(reversed(word)))
  return word == new_word
  
S = input()
N = len(list(S))
if is_kaibunn(S) and is_kaibunn(S[0:int((N-1)/2)]) and is_kaibunn(S[int((N+3)/2 - 1):N]):
  print("Yes")
else:
  print("No")

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

Solution (Python):
s = input()

n = len(s)

h = int((n-1)/2)
t = int((n+3)/2 - 1)

head = s[:h]

tail = s[t:]


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

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

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


def is_parindrome(s, i, j):
    string = s[i:j]
    n = len(string)
    for i in range(n//2):
        start = i
        end = n - i - 1
        if string[start] != string[end]:
            return False
    return True


def main():
    S = input()
    N = len(S)
    if is_parindrome(S, 0, N) and is_parindrome(S, 0, (N - 1)//2) and is_parindrome(S, (N + 3) // 2 - 1, N):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

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

Solution (Python):
s = input()
s_rev = s[::-1]
ans = "Yes"
if not s == s_rev:
  ans = "No"
t = s[:(len(s)-1)//2]
t_rev = t[::-1]
if not t == t_rev:
  ans = "No"
print(ans)

Solution (Python):

if __name__ == '__main__':
    
    s = input()
    n = len(s)

    flug = 1
    for i in range((len(s) - 1) // 2):
        if (s[i] != s[n - 1 - i]):
            flug = 0
            break
    if (flug):
        t = s[:(n - 1) // 2]
        for i in range(len(t) // 2):
            if (t[i] != t[len(t) - 1 - i]):
                flug = 0
        u = s[(n + 3) // 2 - 1:]
        for i in range(len(u) // 2):
            if (u[i] != u[len(u) - 1 - i]):
                flug = 0
        
        
    if (flug == 1):
        print("Yes")
    else:
        print("No")

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

Solution (Python):
import sys


def main():
    s=list(input())
    n=len(s)
    ans='Yes'
    for i in range((n-1)//2):
        if s[i]!=s[n-1-i]:
            ans='No'
            break
        if s[i]!=s[(n-1)//2-1-i]:
            ans='No'
            break
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()

res = 'Yes'
if s != s[::-1]:
    res = 'No'
t = s[:(len(s)-1)//2]
if t != t[::-1]:
    res = 'No'
u = s[((len(s)+3)//2)-1:len(s)]
if u != u[::-1]:
    res = 'No'

print(res)

Solution (Python):
string = str(input())
N = len(string)
zenhan = string[:int((N-1)/2)]
kouhan = string[int((N-1)/2)+1:]

def IsKaibun(string):
    if string == string[::-1]:
        return True
    else:
        return False
      
if IsKaibun(string) and IsKaibun(zenhan) and IsKaibun(kouhan):
    print("Yes")
else:
    print("No")

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

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

s = input()
N = len(s)



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

Solution (Python):
s=input()
t=True
for i in range(0,len(s)//2):
    if s[i]!=s[len(s)-i-1]:
        print("No")
        exit()

for j in range(0,((len(s)-1)//2)//2):
        if s[j]!=s[((len(s)-1)//2)-j-1]:
            print("No")
            exit()

for j in range(0,((len(s)-1)//2)//2):
        if s[len(s)-j-1]!=s[len(s)-((len(s)-1)//2-j)]:
            print("No")
            exit()

print("Yes")

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

Solution (Python):
s = input()

n = len(s)
half = (n-1)//2
flag = True
l = 0
r = n - 1
while l <= r:
  if s[l] != s[r]:
    flag = False
    break
  l += 1
  r -= 1
  
l = 0
r = half - 1
while l <= r:
  if s[l] != s[r]:
    flag = False
    break
  l += 1
  r -= 1

l = half + 1
r = n - 1
while l <= r:
  if s[l] != s[r]:
    flag = False
    break
  l += 1
  r -= 1
  
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
s = list(input())
s_r = list(reversed(s))
n = int((len(s) - 1) / 2)
ss = s[:n]
ss_r = list(reversed(ss))
if s == s_r:
    if ss == ss_r:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):

import sys





YES = "Yes"  
NO = "No"  


def solve(S: str):
    ans=YES
    cent=len(S)//2
    for i in range(cent):
        if S[i] != S[-i-1]:
            ans = NO
        if S[i] != S[cent-i-1]:
            ans = NO

    print(ans)

    return



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

if __name__ == '__main__':
    main()

Solution (Python):
s = input()

n = len(s)
f = int((n-1)/2)
b = int((n+3)/2)

s_r = s[::-1]

s_f = s[:f]
s_f_r = s_f[::-1]

s_b = s[b-1:n]
s_b_r = s_b[::-1]



if(s_r == s and s_f == s_f_r and s_b == s_b_r):
    print("Yes")
else:
    print("No")

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

def judge(s):
    
    return 1 if s == s[::-1] else 0

if not judge(s):
    ok = False

if not judge(s[:((n-1)//2)]):
    ok = False

if not judge(s[((n+3)//2)-1:]):
    ok = False

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

Solution (Python):
from sys import stdin
def main():
    readline=stdin.readline
    S=readline().strip()
    N=len(S)
    M=N//2

    if S==S[::-1] and S[:M]==S[:M][::-1] and S[M+1:]==S[M+1:][::-1]:
        print("Yes")
    else:
        print("No")
if __name__=="__main__":
    main()

Solution (Python):
s = input()
flg = 0
for i in range(len(s)//2):
  if s[i] == s[-i-1]:
    pass
  else:
    flg = 1
s = s[:len(s)//2]
for i in range(len(s)//2):
  if s[i] == s[-i-1]:
    pass
  else:
    flg = 1
if flg == 0:
  print("Yes")
else:
  print("No")

Solution (Python):





def solv(S):
    if S != "".join(reversed(S)):
        return "No"
    s1 = S[0:(len(S)-1)//2]
    if s1 != "".join(reversed(s1)):
        return "No"
    s2 = S[(len(S)+1)//2:]
    if s2 != "".join(reversed(s2)):
        return "No"
    return "Yes"


if __name__ == "__main__":

    
    
    S = input()
    ans = solv(S)

    print(ans)

Solution (Python):
S = input()
N = len(S)
s = S[::-1]
A = S[:(N-1)//2]
a = A[::-1]
B = S[(N+3)//2-1:]
b = B[::-1]

if S==s and A==a and B == b:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
N = len(S)

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

Solution (Python):
s = input()
flag = True
for i in range((len(s)-1)//2):
    if s[i] != s[len(s)-i-1]:
        flag = False
        break
if not flag:
    print('No')
    exit()
else:
    flag1 = True
    flag2 = True
    t = ''
    u = ''
    for i in range((len(s)-1)//2):
        t += s[i]
    for i in range((len(s)-1)//2+1,len(s)):
        u += s[i]
    if len(t)%2 != 0:
        for i in range((len(t)-1)//2):
            if t[i] != t[len(t)-i-1]:
                flag1 = False
                break
    else:
        for i in range(len(t)//2):
            if t[i] != t[len(t)-i-1]:
                flag1 = False
                break
    if len(u)%2 != 0:
        for i in range((len(u)-1)//2):
            if u[i] != u[len(u)-i-1]:
                flag2 = False
                break
    else:
        for i in range(len(u)//2):
            if u[i] != u[len(u)-i-1]:
                flag2 = False
                break
    if flag1 == True and flag2 == True:
        print('Yes')
    else:
        print('No')

Solution (Python):
def reverse(s): 
    return s[::-1] 
  
def isPalindrome(s): 
    rev = reverse(s) 
  
    if (s == rev): 
        return True
    return False

i = input()
a = (len(i)-1)//2 
b = (len(i)+3)//2
s1 = i[:a]
s2 = i[b-1:]
flag = False
if isPalindrome(i):
    if isPalindrome(s1):
        if isPalindrome(s2):
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys,math,copy,queue,itertools
sys.setrecursionlimit(10**7)

def LI(): return [int(x) for x in input().split()]
INF = 10**18
MOD = 10**9 + 7
DD = ((1,0),(0,1),(-1,0),(0,-1))
S = input()
for i in range(len(S)//2):
    if S[i] != S[len(S)-i-1]:
        print ('No')
        exit (0)

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

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

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

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

Solution (Python):
S=input()

f1 = 0
if S == S[::-1]:
    l = len(S) //2
    sl = S[:l]
    if sl == sl[::-1]:
        ll = (len(S)+3)//2-1
        sll = S[ll:]

        if sll == sll[::-1]:
            f1 = 1
            
if f1 == 0:
    print('No')
else:
    print('Yes')

Solution (Python):
S = list(input())
N = len(S)
judge1 = False
judge2 = False
n = (N - 1) // 2
for i in range(n):
    if S[i] != S[-i - 1]:
        break
    if i == n - 1:
        judge1 = True
for i in range(-(-n // 2)):
    if S[i] != S[n - i - 1]:
        break
    if S[n + 1 + i] != S[n + n - i]:
        break
    if i == -(-n // 2) - 1:
        judge2 = True
if judge1 and judge2:
    print("Yes")
else:
    print("No")

Solution (Python):
def func(start, end, leng):
    for i in range(leng):
        if S[start+i] != S[end-i]:
            return False
    else:
        return True

S = input()
N = len(S)
M = len(S)//2

if func(0, N-1, N) and func(0, M-1, M) and func(M+1, N-1, M):
    print("Yes")
else:
    print("No")

Solution (Python):
S=list(input())
N=len(S)
first=True
second=True

for i in range((N-1)//2):
    if S[i]!=S[N-1-i]:
        first=False
if first==True:
    for j in range(N//4+1):
        if S[j]!=S[N//2-1-j]:
            second=False
if first==True and second==True:
    print("Yes")
else:
    print("No")

Solution (Python):
s= input()

s_r = s[::-1]
N = len(s)
s_2 = s[:int((N-1)/2)]
s_3 = s[int((N+1)/2):]

if ( (s == s_r) & (s_2 ==s_2[::-1]) &(s_3 ==s_3[::-1])):
  print('Yes')
else :
  print('No')

Solution (Python):
def main():
    S = input()
    N = len(S)
    T = [s for s in S]
    T1 = ''.join(reversed(T[:(N-1)//2]))
    T2 = ''.join(reversed(T[(N+3)//2-1:]))
    if S != ''.join(reversed(T)):print('No');exit()
    elif S[:(N-1)//2] != T1:print("No");exit()
    elif S[(N+3)//2-1:] != T2:print('No');exit()
    print('Yes')
if __name__ == "__main__":
    main()

Solution (Python):
s=str(input())
a1=s[::-1]
if s!=a1:
    print("No")
    exit()
n=len(s)
a2=s[0:(n-1)//2]

a21=a2[::-1]

if a2!=a21:
    print("No")
    exit()

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

a31=a3[::-1]
if a3!=a31:
    print("No")
    exit()
print("Yes")

Solution (Python):
S = input()
N = len(S)
flag = True
if S != S[::-1]: flag = False
S1 = S[0:(N-1)//2]
if S1 != S1[::-1]: flag = False
S2 = S[(N+3)//2-1:N]
if S2 != S2[::-1]: flag = False

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

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

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

def f(s):
    flag = True
    for i,j in zip(s[:len(s)//2],s[::-1][:len(s)//2]):
        if i != j:
            flag = False
    return flag

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

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

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

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


def is_kaibun(s):
    return "".join(list(reversed(s))) == s


def is_strong_kaibun(s):
    return is_kaibun(s) and is_kaibun(s[:int(N / 2)]) and is_kaibun(s[int(N / 2) + 1:])


result = "Yes" if is_strong_kaibun(S) else "No"
print(result)

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

Solution (Python):


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


def submit():
    s1 = input()
    n = len(s1)
    s2 = s1[:(n - 1)//2]
    s3 = s1[(n + 3)//2 - 1:]

    if check_palindrome(s1) and \
        check_palindrome(s2) and \
        check_palindrome(s3):
        print("Yes")
    else:
        print("No")


submit()

Solution (Python):
if __name__ == "__main__":
    s = input()

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

    if front == back:
        if front == front[::-1] and back == back[::-1]:
            print('Yes')
            exit()

    print('No')

Solution (Python):
def Main(S):
    N = len(S)
    r_S = S[::-1]
    A = S[:(N-1)//2]
    r_A = A[::-1]
    B = S[(N+1)//2:]
    r_B = B[::-1]
    return "Yes" if S == r_S and A == r_A and B == r_B else "No"
    

def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()

Solution (Python):
S = list(input())
t = len(S)
p = 0
for i in range(t//2):
    if S[i] != S[t-1-i]:
        p = 1
        break

if p == 1:
    print("No")
else:
    H = S[:(t-1)//2]
    q = len(H)
    for i in range(q // 2):
        if H[i] != H[q - 1 - i]:
            p = 1
            break
    if p == 1:
        print("No")
    else:
        K = S[(t+3)//2 - 1:]
        k = len(K)
        for i in range(k // 2):
            if K[i] != K[k - 1 - i]:
                p = 1
                break
        if p == 1:
            print("No")
        else:
            print("Yes")

Solution (Python):












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




if s == revs and s2 == revs2 and s3 == revs3:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):


import sys

DEBUG = False

def read(t):
    return t(sys.stdin.readline().rstrip())


def read_list(t, sep = " "):
    return [t(s) for s in sys.stdin.readline().rstrip().split(sep)]


def dprint(*args, **kwargs):
    if DEBUG:
        print(*args, **kwargs)
    return

def is_panlindrome(s):
    dprint("s: %s" % (s))
    if list(s) == list(reversed(s)):
        return True
    return False

def judge(s):
    if not is_panlindrome(s):
        return False
    if not is_panlindrome(s[0:(len(s) - 1)//2]):
        return False
    if not is_panlindrome(s[(len(s) + 3) // 2 - 1: len(s)]):
        return False
    return True


def main():
    s = read(str)
    j = judge(s)
    if j:
        print("Yes")
    else:
        print("No")

    pass


if __name__ == "__main__":
    main()

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

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]

S = input()

def isKaibun(S):
    flag = True

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

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

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


for x, y in zip(S, S[::-1]):
    if x != y:
        print("No")
        exit()

L = S[: (N - 1) // 2]
R = S[-(N - 1) // 2:]


for x, y in zip(R, R[::-1]):
    if x != y:
        print("No")
        exit()
for x, y in zip(L, L[::-1]):
    if x != y:
        print("No")
        exit()
print("Yes")

Solution (Python):
def main():
    s = input()
    sl = (len(s) - 1) // 2
    a = s[:sl]
    b = s[-sl:]
    if a == b:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):

def f(ss):
    s = list(ss)
    srv = list(reversed(s))
    if s == srv:
        return True
    else:
        return False
def main():
    s = input()
    n = len(s)
    flag = True
    if not f(s):
        flag = False
    if not f(s[:(n-1)//2]):
        flag = False
    if not f(s[((n+3)//2)-1]):
        flag = False

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
s = input()

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

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

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

Solution (Python):
import sys
s=input() 
n = len(s)
k=(n-1)//2

for i in range(n):
    if s[i]!=s[-i-1]:
        print('No')
        sys.exit()
for j in range(k):
    if s[j]!=s[k-j-1] or s[j+k+1]!=s[2*k-j]:
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
import sys
S=input()
N=len(S)
S1=S[0:int((N-1)/2)]
S2=S[int((N+3)/2-1):]

if S1 != S2[::-1]:
  print('No')
  sys.exit()
if S1 != S1[::-1]:
  print('No')
  sys.exit()
if S2 != S2[::-1]:
  print('No')
  sys.exit()
print('Yes')

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

i = 0
ans = "Yes"
while(i<((n-1)//2)):
  if s[i] != s[n-1-i]:
    ans = "No"
    break
  elif s[i] != s[(n-1)//2-1-i] or s[(n+3)//2-1+i] != s[n-1-i]:
    ans = "No"
    break
  i += 1
print(ans)

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

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

fr = f[::-1]
br = b[::-1]
flag = True
if s == sr:
    pass
else:
    flag = False
if f == fr:
    pass
else:
    flag = False
if b == br:
    pass
else:
    flag = False
    
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


class PriorityQueue:
    def __init__(self, l=[]):
        self.q = l
        heapq.heapify(self.q)
        return

    def push(self, n):
        heapq.heappush(self.q, n)
        return

    def pop(self):
        return heapq.heappop(self.q)


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def main():
    
    def ispalindrome(str): return 1 if str == str[::-1] else 0
    S = Scanner.string()
    if not ispalindrome(S):
        print('No')
        return
    if not ispalindrome(S[:len(S)//2]):
        print('No')
        return
    if not ispalindrome(S[len(S) // 2 + 1:]):
        print('No')
        return
    print('Yes')
    return


if __name__ == "__main__":
    main()

Solution (Python):
import sys

s = sys.stdin.readline().strip()
n = len(s)
def check(s):

    left = 0
    right = len(s) - 1 
    while left < right:
        if s[left] != s[right]:
            return False
        left += 1
        right -= 1
    return True
if check(s) and check(s[:(n-1)//2]) and check(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
S = input()

N = len(S)
ans = 0
if S == S[::-1]:
    ans = ans + 1

tmp = S[:(N-1)//2]
if tmp == tmp[::-1]:
    ans = ans + 1

tmp = S[(N+3)//2-1:]
if tmp == tmp[::-1]:
    ans = ans + 1

print(["No", "Yes"][ans==3])

Solution (Python):
s = input()

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

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

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()
first = is_kaibun(S)
S_s = S[0:len(S) // 2]
second = is_kaibun(S_s)
S_t = S[len(S) // 2 + 1:len(S)]
third = is_kaibun(S_t)
if first and second and third:
    print("Yes")
else:
    print("No")

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

s = input()
n = len(s)

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

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

s=input()
n=len(s)

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

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

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

Solution (Python):
S = list(input())
N = len(S)
S_n_1 = S[:(N-1)//2]
S_n_2 = S[(N+3)//2-1:]



flag = 0
reverse_S = list(reversed(S))
reverse_S_n_1 = list(reversed(S_n_1))
reverse_S_n_2 = list(reversed(S_n_2))



if S == reverse_S and S_n_1 == reverse_S_n_1 and S_n_2 == reverse_S_n_2:
    print("Yes")
else:
    print("No")

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

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

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

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