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

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

Solution (Python):
def check_palindrome(s):
  n = len(s)
  return all([s[i] == s[n - 1 - i] for i in range(n // 2)])


def main():
  s = input()
  n = len(s)
  print('Yes' if check_palindrome(s) and check_palindrome(s[:n // 2]) else 'No')


main()

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

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

Solution (Python):
S = input().strip()
N=len(S)
count=0

if N%4==1:
    for i in range(int((N-1)/2)//2):
        if S[i] == S[int(((N-3)/2)-i)] and S[i] == S[int(((N+1)/2)+i)] and S[i] == S[N-1-i]:
           count+=1


elif N%4==3:
    for i in range(int((N-1)/2)//2):
        if S[i] == S[int(((N-3)/2)-i)] and S[i] == S[int(((N+1)/2)+i)] and S[i] == S[N-1-i] and S[int(((N-1)/2)//2)] == S[N-1-int(((N-1)/2)//2)]:
           count+=1

if count==int((N-1)/2)//2:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input().strip()


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


def is_strong_palindrome(string):
    if not is_palindrome(string):
        return False
    n = len(string)
    if not is_palindrome(string[:(n - 1)//2]):
        return False
    if not is_palindrome(string[(n+3)//2 - 1:]):
        return False
    return True


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

Solution (Python):
s = str(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 s[i] != s[(len(s)//2-i-1)]:
        print("No")
        exit()
for i in range(len(s) - (len(s)+3)//2):
    if s[(len(s)+3)//2+i-1] != s[-(i+1)]:
        print("No")
        exit()
print("Yes")

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

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

def resolve():
    readline=sys.stdin.readline

    
    
    
    ss=readline().rstrip()
    
    n=len(ss)
    yn(kaibun(ss) and kaibun(ss[0:(n-1)//2]) and kaibun(ss[(n+3)//2-1:n]))

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())

def is_palindrome(s):
    l = 0
    r = len(s) - 1

    while l < r:
        if s[l] != s[r]:
            return False
        l += 1
        r -= 1

    return True

def main():
    s = input()
    n = len(s)
    print(('No', 'Yes')[(is_palindrome(s) and is_palindrome(s[:n//2]) and is_palindrome(s[n//2+1:]))])

main()

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

Solution (Python):

S = input()
N = len(S)

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

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

if qq(s):
  if qq(s[:n//2]):
    if qq(s[n//2+1]):
      print("Yes")
      exit()
print("No")

Solution (Python):



S = input()
N = len(S)
n = int((N - 1) / 2)
n2 = int((N - 1) / 2)
S2 = S[0:n2]
n3 = int((N+3)/2)
S3 = S[n3 -1:]

isNo1OK = True
isNo2OK = True
isNo3OK = True

for i in range(n):
  if S[i] != S[(i + 1) * -1]:
    isNo1OK = False

for j in range(len(S2)):
  if S2[j] != S2[(j + 1) * -1]:
    isNo2OK = False

for k in range(len(S3)):
  if S3[k] != S3[(k + 1) * -1]:
    isNo2OK = False

if isNo1OK and isNo2OK and isNo3OK:
  print("Yes")
else:
  print("No")

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

S = input()
n = len(S)
is_strong = True
if not is_palindrome(S):
    is_strong = False
if not is_palindrome(S[:(n - 1) // 2]):
    is_strong = False
if not is_palindrome(S[( n + 3) // 2 - 1:]):
    is_strong = False

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

Solution (Python):

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


a = s[:int((n-1)/2)]
b = s[int((n+3)/2-1):]

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

Solution (Python):
import sys
s=input()
n=len(s)
s_pre = s[:(n-1)//2]
s_epi = s[(n+1)//2:]
if s != s[::-1]:
    print('No')
    sys.exit()
if s_pre != s_pre[::-1]:
    print('No')
    sys.exit()
if s_epi != s_epi[::-1]:
    print('No')
    sys.exit()
print('Yes')

Solution (Python):

def kaibuncheck(S):
    N=len(S)
    if N == 1:
        return 1

    N_val=N-1
    center=int((N-1)/2)
    checkpoint=0
    if N == 1:
        return 1
    for i in range(center-1):
        if S[i] == S[N_val]:
            checkpoint+=1
        N_val -= 1

    if checkpoint == center-1:
        return 1
    else:
        return 0

S = list(input())
N = len(S)
N2 = int((N-1)/2)

S_start=list()
S_end=list()
for i in range(N2):
    S_start.append(S[i])
    S_end.append(S[N2+1+i])

if N%2 == 1:
    if kaibuncheck(S) == 1 and kaibuncheck(S_start) == 1 and kaibuncheck(S_end) == 1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

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

Solution (Python):
s = input()

div = len(s) // 2
pre = s[:div]
suf = s[div + 1:]

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

Solution (Python):
str = input()
rev_str = str[::-1]
len_str = len(str)

pre_str = str[0:((len_str-1)//2)]
pro_str = str[(((len_str+3)//2)-1)::]





rev_pre_str = pre_str[::-1]
rev_pro_str = pro_str[::-1]

pali = 0

if str == rev_str:
    if pre_str == rev_pre_str:
        if pro_str == rev_pro_str:
            pali = 1

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

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

def check(str):
    return str==''.join(reversed(list(str)))

if check(S) and check(a) and check(b):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

import sys

N = len(S)

be = S[:N//2]
af = S[N//2+1:]

if S == ''.join(list(reversed(S))):
    if be == ''.join(list(reversed(be))):
        if af == ''.join(list(reversed(af))):
            print("Yes")
            sys.exit()
            
print("No")

Solution (Python):
def main():
    S = input()
    N = len(S)
    M = N//2
    for i in range(M//2+1):
        if S[i] == S[M-1-i] == S[M+1+i] == S[N-1-i]:
            continue
        else:
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    main()

Solution (Python):

S = input()










N = len(S)
flag = True
for i in range(int((N-1)/2)):
    if S[i] != S[int((N-1)/2)-1-i]:
        flag = False
        break
for i in range(int((N+3)/2), N):
    if S[i] != S[N-1-i]:
        flag = False
        break
if flag: print('Yes')
else: print('No')

Solution (Python):
import sys
S=input()
N = len(S)
S_re = S[::-1]
S_1 = S[0:(N-1)//2]
S_2 = S[(N+3)//2-1:N]
if S == S_re:
    if S_1 == S_1[::-1]:
        if S_2 == S_2[::-1]:
            print('Yes')
            sys.exit()

print('No')

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

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

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

N = len(S)

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

Solution (Python):
import sys
input=sys.stdin.readline
S = input()[:-1]
n = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 0:
    print("No")
else:
    s1 = S[0:n // 2]
    if kaibun(s1) == 1:
        print("Yes")
    else:
        print("No")

Solution (Python):
input_str = input().strip()

def main():
  N = len(input_str)
  input_str_part1 = input_str[:int((N-1)/2)]
  input_str_part2 = input_str[int((N+3)/2)-1:]
  flag0 = input_str == input_str[::-1]
  flag1 = input_str_part1 == input_str_part1[::-1]
  flag2 = input_str_part2 == input_str_part2[::-1]
  if flag0 * flag1 * flag2:
    print("Yes")
  else:
      print("No")
  return

if __name__ == "__main__":
  main()

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

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

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

if s[:(n-1)//2] == ''.join(reversed(s[:(n-1)//2])) and s[((n+3)//2-1):] == ''.join(reversed(s[((n+3)//2-1):])) and s[:(n-1)//2] == s[((n+3)//2-1):]:
  print("Yes")
else:
  print("No")

Solution (Python):
kaibun = input()
NList = list(kaibun)
N = len(NList)

T1 = True
T2 = True
T3 = True

for s in range(len(NList)):
    if NList[s] != NList[len(NList) - (s+1)]:
        T1 = False
        break


NList = list(kaibun[0:int((N - 1)/2)])

for s in range(len(NList)):
    if NList[s] != NList[len(NList) - (s+1)]:
        T2 = False
        break

NList = list(kaibun[int(((N+3)/2)-1):N])
for s in range(len(NList)):
    if NList[s] != NList[len(NList) - (s+1)]:
        T3 = False
        break

if T1 and T2 and T3:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
Sd = S[:(N-1)//2]
Sdd = S[(N+1)//2:N]
if S == S[::-1] and Sd == Sd[::-1] and Sdd == Sdd[::-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()
f_half = s[:int((len(s) - 1) / 2)]
l_half = s[int((len(s) + 3) / 2 - 1):]

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

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

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

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

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

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

Solution (Python):
import sys

s = input()
n = len(s)
if s == s[::-1]:
    t = s[:(n - 1) // 2]
    if t == t[::-1]:
        print("Yes")
        sys.exit()
print("No")

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

Solution (Python):
s = list(input())
rev = s[::-1]

s1 = s[:int((len(s)-1)/2)]
rev1 = s1[::-1]

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

if s == rev and s1 == rev1 and s2 == rev2:
  print('Yes')
else:
  print('No')

Solution (Python):


import sys
stdin = sys.stdin
YES = "Yes"
NO = "No"
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()


s = list(ns())
n = len(s)
ss = s[:(n-1)//2]
sss = s[(n+3)//2-1:]
 
if s == list(reversed(s)) and ss == list(reversed(ss)) and sss == list(reversed(sss)):
    print('Yes')
else:
    print('No')

Solution (Python):


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

def main():
    mod=10**9+7
    def ch(s):
        t=s[::-1]
        if s==t:
            return True
        else:
            return False
        
    S=input()
    N=len(S)
    
    if ch(S) and ch(S[:(N-1)//2]) and ch(S[(N+3)//2-1:]):
        print("Yes")
    else:
        print("No")
        

          
main()

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

Solution (Python):
S = input()
def kaibun_check(bun):
    if bun == bun[::-1]:
        return True
    else:
        return False
if kaibun_check(S):
    idx = int((len(S) -1)/2)
    if kaibun_check(S[:idx]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s=input()
lst=[]
for i in s:
    lst.append(i)
def check(ls):
    ls_=list(reversed(ls))
    if not ls==ls_:
        print('No')
        exit()
check(lst)
n=len(lst)
check(lst[:(n-1)//2])
check(lst[(n+3)//2-1:])
print('Yes')

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

Solution (Python):





import sys



def is_palindrome(s: str) -> bool:
    """decide if s is palindrome or not.

    example:
        >>> s = "akasaka"
        >>> is_palindrome(s)
        
        >>> s = "tokyo"
        >>> is_palindrome(s)
        No

    """
    for i in range(int(len(s) / 2)):
        if s[i] != s[-(i + 1)]:
            print("No")
            sys.exit()


s = str(input())
s_firsthalf = s[:int((len(s) - 1) / 2)]
s_secondhalf = s[int((len(s) + 3) / 2)-1:]

is_palindrome(s)
is_palindrome(s_firsthalf)
is_palindrome(s_secondhalf)

print("Yes")

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

T=list(reversed(S))
SS=S[:len(S)//2]
TT=list(reversed(S[:len(S)//2]))
SSS=S[len(S[:len(S)//2])+1:]
TTT=list(reversed(S[:len(S)//2]))

if S==T and SS==TT and SSS==TTT:
      print('Yes')
else:
      print('No')

Solution (Python):
s = input()
L = len(s)
flag = 1
flag1 = 1
flag2 = 1
for i in range(L):
    if s[i]!=s[L-i-1]:
        flag = 0
for i in range((L-1)//2):
    if s[i]!=s[(L-1)//2-1-i]:
        flag1 = 0
for i in range((L+3)//2,L):
    if s[i]!=s[(L-1)//2+L-i]:
        flag2 = 0
if flag == 1 and flag1 == 1 and flag2 == 1:
    print("Yes")
else:
    print("No")

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

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


txt = 'No'
n1 = (l - 1) // 2
n2 = (l + 3) // 2


if f(s) and f(s[:n1]) and f(s[n2 - 1:]):
    txt = 'Yes'

print(txt)

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

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

S00=S[::]
S01=S00[::-1]

S02=S[:(n-1)//2]
S03=S02[::-1]

if S00==S01 and S02==S03:
  print("Yes")
else:
  print("No")

Solution (Python):
ls = list(input())
n = len(ls)
rvls = ls[::-1]

fh = int((n-1) /2)
fhls = ls[:fh]
rvfhls = fhls[::-1]

sh = int((n+3)/2-1)
shls = ls[sh:]
rvshls = shls[::-1]


if ls == rvls and fhls==rvfhls and shls == rvshls:
    print('Yes')
else:
    print('No')

Solution (Python):

S = input()
def check(S):
    ret = True
    for i in range(len(S)//2):
        if S[i] != S[-i-1]:
            ret = False
    return ret
if len(S) == 3:
    if S[0] != S[-1]:
        print("No")
    else:
        print("Yes")
    exit()
flag = True
if not check(S):
    flag = False
if not check(S[:(len(S))//2]):
    flag = False
if not check(S[(len(S)+3)//2-1:]):
    flag = False
print("Yes" if flag else "No")

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

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

S00 = S[:]
S01 = S00[::-1]
S10 = S[:(n-1)//2]
S11 = S10[::-1]
S20 = S[(n+3)//2-1:]
S21 = S20[::-1]

if S00 == S01 and S10 == S11 and S20 == S21:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

s_re=s[::-1]
s1=s[0:int((len(s)-1)/2)]
s2=s[int((len(s)+3)/2)-1::]
s1_re=s1[::-1]
s2_re=s2[::-1]

if s==s_re and s1==s1_re and s2==s2_re:
    print('Yes')
else:
    print('No')

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

Solution (Python):

S = input()

slen = int((len(S)-1)/2)

sleft = S[:slen]
sright = S[slen:]

if sleft in sright:
  print ("Yes")
else:
  print ("No")

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

Solution (Python):





S = input()
n = len(S)
judge = True
if S != S[::-1]:
    judge = False
for i, j in zip(S[:n//2], S[n//2+1:]):
    if i != j:
        judge = False
print("Yes") if judge else print("No")

Solution (Python):
s1 = list(input())
N = len(s1)
s1_r = s1[::-1]
ans = "No"
cnt = 0
if s1 == s1_r:
    cnt += 1
s2 = s1[:(N-1)//2:]
s2_r = s2[::-1]
if s2 == s2_r:
    cnt += 1
s3 = s1[(N+3)//2-1:]
s3_r = s3[::-1]
if s3 == s3_r:
    cnt += 1
if cnt == 3:
    ans = "Yes"
print(ans)

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

def solve(s):
    n = len(s)
    t = s[:n//2]
    u = s[::-1][:n//2]
    return "Yes" if (ok(s) and ok(t) and ok(u)) else "No"

assert solve("akasaka") == "Yes"
assert solve("level") == "No"
assert solve("atcoder") == "No"

s = input()
print(solve(s))

Solution (Python):
S = input()
S1 = S[0:(len(S)-1)//2]
S2 = S[(len(S)-1)//2+1:len(S)]

def discrimination(S):
    N = len(S)
    if N%2==0:
        return all(S[i]==S[N-1-i] for i in range(N//2))
    else:
        return all(S[i]==S[N-1-i] for i in range((N-1)//2))

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

Solution (Python):
import sys
import os
import collections

def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = sys.stdin.buffer.readline().decode().rstrip()
    p = S[:(len(S)-1)//2]
    u = S[(len(S)+2)//2:]
    print('Yes' if S == S[::-1] and p == p[::-1] and u == u[::-1] else 'No')


if __name__ == '__main__':
    main()

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

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

Solution (Python):
print("Yes" if all(map(lambda x: x == x[::-1], list(map(lambda s: [s, s[:len(s) // 2], s[(len(s) + 2) // 2:]], [input()]))[0])) else "No")

Solution (Python):
S = input()
result = 0
for i in range(len(S)//2):
  if S[i] != S[-1-i]:
    result += 1
A = S[:(len(S)-1)//2]

for i in range(len(A)//2):
  
  if A[i] != A[-1-i]:
    result += 1
B = S[(len(S)+2)//2:]

for i in range(len(B)//2):
  if B[i] != B[-1-i]:
    result += 1
print("Yes" if result == 0 else "No")

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

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

Solution (Python):
string = input()

middle=len(string)//2

def isPal(string):
    return string==string[::-1]

if isPal(string):
    if isPal(string[:middle]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
S = str(input())
s = S[::-1]
if S == s:
    A = S[:len(S)//2]
    a = A[::-1]
    B = S[len(S)//2+1:]
    b = B[::-1]
    if (A == a)and(B == b):
        print('Yes')
        exit(0)
print('No')

Solution (Python):

S = input()

n = len(S)
flg = True 
if S != S[::-1]:
    flg = False
s2 = S[:int((n-1)/2)]
if s2 != s2[::-1]:
    flg = False
s3 = S[int((n+3)/2):n-1]
if s3 != s3[::-1]:
    flg = False

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

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

if S[:(N-1)//2] == S[(N+2)//2:]:
  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):
S = input()
N = len(S)
if S == S[::-1] and S[:(N-1)//2] == S[:(N-1)//2][::-1]:
    print('Yes')
else:
    print('No')

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

    flag = True
    flag &= s == s[::-1]
    if not flag:
        print('No')
        return
    sh = s[0:(s_len-1)//2]
    st = s[(s_len+3)//2-1:]
    flag &= sh == sh[::-1]
    flag &= st == st[::-1]
    if not flag:
        print('No')
    else:
        print('Yes')
    return

main()

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

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

Solution (Python):
s = input()

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

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

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

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

Solution (Python):
S=input()
listy=[S[i] for i in range(len(S)) ]
rev=list(reversed(listy))
bef=(len(S)-1)/2
aft=(len(S)+3)/2
jouken1=listy[0:int(bef)]
rev2=list(reversed(jouken1))
jouken2=listy[int(aft-1):len(S)]
rev3=list(reversed(jouken2))
if rev==listy and rev2==jouken1 and rev3==jouken2:
    print("Yes")
else:
    print("No")

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

Solution (Python):
def checkpalin(s):
    if(s==s[::-1]):
        return True

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

Solution (Python):
s=input()
n=len(s)
if all(s[i]==s[n-i-1] for i in range(n//2)):
    if all(s[i]==s[(n-1)//2-i-1] for i in range((n-1)//4)):
        if all(s[(n+3)//2-1+i]==s[n-i-1] for i in range((n-1)//4)):
            print('Yes')
            exit()
print('No')

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

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') 
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(sys.stdin.readline()) 
def ifn(): return float(sys.stdin.readline()) 
def isn(): return sys.stdin.readline().split() 
def imn(): return map(int, sys.stdin.readline().split()) 
def imnn(): return map(lambda x:int(x)-1, sys.stdin.readline().split()) 
def fmn(): return map(float, sys.stdin.readline().split()) 
def iln(): return list(map(int, sys.stdin.readline().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, sys.stdin.readline().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

S = input()
N = len(S)

if S != S[::-1]:
    print("No")
    exit()
SF = S[0:(N-1)//2]
if SF != SF[::-1]:
    print("No")
    exit()
SL = S[(N+3)//2-1:]
if SL != SL[::-1]:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()
def kaibun(s):
    return all([s[i] == s[-(i + 1)] for i in range(int(len(s) / 2))])
n = len(s)

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

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

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

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

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

if is_kaibun(s):
  if is_kaibun(left):
    if is_kaibun(right):
      print('Yes')
    else:
      print('No')
  else:
     print('No')
else:
  print('No')

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
import sys,bisect,string,math,time,functools,random
def Golf():*a,=map(int,open(0))
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[];g=[[] for i in range(n)]
    for i in range(E):
        inp=LI();org_inp.append(inp)
        if index==0:inp[0]-=1;inp[1]-=1
        if len(inp)==2:
            a,b=inp;g[a].append(b)
            if not Directed:g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp;aa=(inp[0],inp[2]);bb=(inp[1],inp[2]);g[a].append(bb)
            if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,boundary=1,search=[],replacement_of_found='.',mp_def={'

    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def bit_combination(k,n=2):return [[tb//(n**bt)%n for bt in range(k)] for tb in range(n**k)]
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)
def show2d(g,h,w):
    for i in range(h):show(g[i*w:i*w+w])

YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase

input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

s=S_()
n=len(s)
t=s[:~-n//2]
u=s[(n+2)//2:]
if s==s[::-1] and t==t[::-1] and u==u[::-1]:
    k=0
else:
    k=1

ans=Yn[k]
print(ans)

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

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


cond_1 = S[:int((N-1)/2)]
cond_1_r = cond_1[::-1]

if cond_1 != cond_1_r:
    print('No')
    exit(0)

cond_2 = S[int((N+3)/2-1):]
cond_2_r = cond_2[::-1]

if cond_2 != cond_2_r:
    print('No')
    exit(0)

print('Yes')

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

if s != list(reversed(s)):
    print("No")
    exit()

seq = s[0:int(((n-1)/2))]

if seq != list(reversed(seq)):
    print("No")
    exit()


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

if seq != list(reversed(seq)):
    print("No")
    exit()

print("Yes")

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