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()
n = len(s)

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

key = int((n-1)/2)
tmp = s[0:key]
if tmp != tmp[::-1]:
  print("No")
  exit()

key = int(((n+3)/2)-1)
tmp = s[key:n]
if tmp != tmp[::-1]:
  print("No")
  exit()
  
print("Yes")

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

def string_parindrome(s):
    if parindrome(s):
        N = len(s)
        if parindrome(s[:((N-1)//2):]) and parindrome(s[((N+3)//2)-1::]):
            return "Yes"
    return "No"
    

S = input()
print(string_parindrome(S))

Solution (Python):
s = str(input())
n = len(s)
s1 = s[:]
s1 = s1[:(n-1)//2]
s2 = s[:]
s2 = s2[((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()
ans = 'Yes'
if s != s[::-1]:
  ans = 'No'
left = (len(s)-1)//2
if s[:left] != s[:left][::-1]:
  ans = 'No'
  
print(ans)

Solution (Python):
def isPalin(s):
    return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]

if isPalin(a) and isPalin(b) and len(s)%2!=0 and isPalin(s):
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):

import sys
import itertools


from operator import itemgetter
from sys import stdin


N=3
M=3
i=0
j=0
k=0

s=input()
a=[i for i in s]

N=len(s)

N1=int(((N-1)/2-1)/2+1)
N2=int((N-1)/2-1)
N3=int((N+3)/2-1)
N4=int((N+1)/2)
for i in range(N4):
    
    if a[i]==a[N-1-i]:
        pass
    else:
        print("No")
        sys.exit()

for i in range(N1):
    if a[i]==a[N2-i] and a[N3+i]==a[N-1-i]:
        pass
    else:
        print("No")
        
        
        sys.exit()
print("Yes")




"1行1つの整数を入力を取得し、整数と取得する"




"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

for i in number_list:
    print(number_list[i-1])

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''



"正方行列にstr型の値を入力"
'''




'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"


'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''











'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''




"aという変数に入っているものを大文字にして出力"

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

s = input()
n = len(s)

s1 = s[::-1]





a = int((n - 1) / 2 - 1)

s2 = s[0:a + 1]




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



if is_kaibun(s) and is_kaibun(s2) and is_kaibun(s3):
    print('Yes')
else:
    print('No')

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

r = 0

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

s_1 = s[:int(a)]
s_2 = s[int(b-1):]


def cond(l=None):
    if l is None:
        l = []
    
    l_rev = list(reversed(l))
    if l == l_rev:
        return 0
    else:
        return 1


for l in (s, s_1, s_2):
    r = cond(l)
    
    if r != 0:
        break

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

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

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

import math
M = math.floor((N-3)/2)

a = 0

for i in range(M):
  if S[i] != S[i+M+2]:
    a = 1
    
for j in range(M):
  if S[j] != S[N-j-1]:
    a = 1
    
if a == 0:
  print('Yes')
  
else:
  print('No')

Solution (Python):
s=str(input())
def judge(s):
  l=len(s)
  if l%2==1:
    for i in range((l-1)//2):
      if s[i]==s[-i-1]:
        pass
      else:
        return 0
    return 1
  else:
    for i in range(l//2):
      if s[i]==s[-i-1]:
        pass
      else:
        return 0
    return 1
L=len(s)
if judge(s)==1 and judge(s[0:(L-1)//2])==1 and judge(s[(L+3)//2-1:])==1:
  print('Yes')
else:
  print('No')

Solution (Python):
S = str(input())
judge = 'Yes'
S = list(S)
for i in range(int(len(S)/2)):
    if S[i] != S[len(S) - 1 - i]:
        judge = 'No'
for i in range(int(len(S)/4)):
    if S[i] != S[int(len(S)/2) - 1 - i]:
        judge = 'No'
for i in range(int(len(S)/4)):
    if S[i + int(len(S)/2) + 1] != S[int(len(S)) - 1 - i]:
        judge = 'No'
print(judge)

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

s = input()
if(palindrome(s)):
    n = len(s)
    if(palindrome(''.join(list(s)[:((n-1)//2)]))):
        if(palindrome(''.join(list(s)[((n+3)//2)-1:n]))):
            print('Yes')
            exit()
print('No')

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

Solution (Python):
S = input()
T = ''.join(list(reversed(S)))
N = len(S)
T1 = "".join(list(reversed(S[:int((N-1)/2)])))
T2 = ''.join( list( reversed( S[int((N+3)/2)-1:] ) ) )

Ans = "Yes"

if S != T or S[:int((N-1)/2)] != T1 or S[int((N+3)/2)-1:] != T2:
    Ans = "No"

print(Ans)

Solution (Python):
S = list(str(input()))
N = len(S)
if S == list(reversed(S)) and S[:(N-1)//2] == list(reversed(S[:(N-1)//2])):
  print("Yes")
else:
  print("No")

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

Solution (Python):
def solve():
  s = input()
  hoge = len(s) // 2
  bit = 0
  if s[0:hoge] == s[-hoge:len(s)][::-1]:
    bit += 1
  n = hoge
  if s[0:hoge][0:hoge] == s[0:hoge][-hoge:len(s)][::-1]:
    bit += 1
  hoge = (len(s) + 3) // 2 - 1
  ss = s[hoge:len(s)]
  huga = len(ss) // 2
  if ss[0:huga] == ss[-huga:len(ss)][::-1]:
    bit += 1
  if len(s) == 3:
    bit = 3
  if bit == 3:
    print("Yes")
  else:
    print("No")
  return 0

if __name__ == "__main__":
  solve()

Solution (Python):
s = input()

def judge(s):
    n = len(s)
    for i in range(n//2):
        if s[i] == s[n-1-i]:
            continue
        else: return 0
    return 1

temp1 = s[:len(s)//2]
temp2 = s[len(s)//2+1:]

if judge(s) and judge(temp1) and judge(temp2):
    print("Yes")
else:
    print("No")

Solution (Python):

S = list(input())

N = len(S)



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



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

if S1 == S2:
    print('Yes')
else:
    print('No')

Solution (Python):
line=input()
n=int(len(line))
m=int((n-1)/2)
front_line=line[:m]
if line != line[::-1]:
  print("No")
else:
  if front_line != front_line[::-1]:
    print("No")
  else:
    print("Yes")

Solution (Python):
def kaibun(s):
    N = len(s)

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

string = input()
N = len(string)
if kaibun(string) and kaibun(string[:(N - 1) // 2]) and kaibun(string[(N + 1) // 2:N]):
    print('Yes')
else:
    print('No')

Solution (Python):
def isPalin(s):
    return s[::-1]==s
s=input()
n=len(s)
n1,n2=(n-1)//2,(n+3)//2
a,b=s[:n1],s[n2-1:]

if isPalin(a) and isPalin(b) and len(s)%2!=0 and isPalin(s):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

s = [c for c in s]

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

def check(s):
    left = []
    right = []
    while len(s)>1:
        left.append(s.pop(0))
        right.append(s.pop())

    if left==right:
        return True
    else:
        return False


if check(left)==True and check(right)==True and check(s)==True:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)
count = 0
halfn = int((n-1) / 2)
whalfn = int((n-1) / 4)
half = s[0:halfn]

for i in range(len(s)):
    if s[i] != s[-i-1]:
      count += 1
      break
    else:
      pass

for i in range(len(half)):
  if half[i] != half[-i-1]:
    count += 1
    break
  else:
    pass

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

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


def palindromic(word):
    if word == word[::-1]:
        return 1
    else:
        return 0


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

Solution (Python):
s = input()

s_ = s[:len(s)//2]
_s = s[1+len(s)//2:]

if s_ != _s:
  print('No')
  quit()


if (len(s)//2)%2==0:
  a = s_[:len(s_)//2]
  b = s_[len(s_)//2:][::-1]
  c = _s[:len(_s)//2]
  d = _s[len(_s)//2:][::-1]
  
  if a == b:
    if c == d:
      print('Yes')
      quit()

  print('No')

if (len(s)//2)%2==1:
  a = s_[:len(s_)//2]
  b = s_[1+len(s_)//2:][::-1]
  c = _s[:len(_s)//2]
  d = _s[1+len(_s)//2:][::-1]
  
  if a == b:
    if c == d:
      print('Yes')
      quit()

  print('No')

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

Solution (Python):
S=input()
N=len(S)
f=True
for i in range(N//2):
    if S[i]!=S[-1-i]:f=False
if f==True:
    s1=S[0:(N-1)//2]
    s2=S[(N+3)//2-1::]
    for i in range(N//2//2):
        if s1[i]!=s1[-1-i] or s2[i]!=s2[-1-i]:f=False
print("Yes") if f==True  else print("No")

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

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

Solution (Python):
S = input()
N = len(S)
flag = True
for i in range(N//2):
    if S[i]!=S[N-1-i]:
        flag = False
moji1 = S[:((N-1)//2)]
for i in range(N//2):
    if moji1[i]!=moji1[len(moji1)-1-i]:
        flag = False
moji = S[((N+3)//2)-1:]
for i in range(N//2):
    if moji[i]!=moji[len(moji)-1-i]:
        flag = False

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

Solution (Python):
s = input().strip()
y, n = "Yes", "No"
mid = len(s)//2
if s[0:mid] == s[mid+1:len(s)]:
    print(y)
else:
    print(n)

Solution (Python):
s=input()
n=len(s)
end_1=(n-1)//2
s_1=s[0:end_1]
end_2 = (n+3)//2
s_2=s[end_2-1::]


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

Solution (Python):

S = str(input())

N = int(len(S))
kaibun1 = int((N-1)/2)
kaibun2 = int((N+2)/2)






if S[0:kaibun1] == S[kaibun2:N]:
  print("Yes")
else:
  print("No")

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

t=True
for i in range(int(len(S)/2)):
    if S[i]!=S[(i+1)*-1]:

        t=False
        break

s_max =len(S)-1
S_befor = S[0:int(s_max/2)]
for i in range(int(len(S_befor)/2)):
    if S_befor[i]!=S_befor[(i+1)*-1]:

        t=False
        break

S_after = S[int((len(S)+3)/2):-1]
for i in range(int(len(S_after)/2)):
    if S_after[i]!=S_after[(i+1)*-1]:
        t=False
        break

if t==True:
    print("Yes")
else:
    print("No")

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

t = s[::-1]
c = t[:(n-1)//2]
d = t[(n+3)//2-1:]
if (a==b) and (b==c) and (c==d) and (d==a):
  print('Yes')
else:
  print('No')

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

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

    print("Yes")
 
if __name__ == '__main__':
    main()

Solution (Python):
s = input()
n = (len(s)-1)//2
s = list(s)
rs = s[::-1]
lw = s[0:n]
rw = s[n+1:]
lws = lw[::-1]
rws = rw[::-1]

if s != rs:
    print("No")
elif (rw != rws) or (lw != lws):
    print("No")
else:
    print("Yes")

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

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

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

flag = True

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

if flag==True:
  right = int((N-1) / 2)
  subS = S[0:right]
  for i in range(int(len(subS)/2)):
    if subS[i]!=subS[-1-i]:
      flag = False
      break

if flag==True:
  left = int((N+3) / 2)
  subS = S[left-1:N]
  for i in range(int(len(subS)/2)):
    if subS[i]!=subS[-1-i]:
      flag = False
      break

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

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

s = input()
n = int(len(s)/2)

s1 = s[:n]
s2 = s[n+1:]
s2 = s2[::-1]

if is_kaibun(s) == True:
  if is_kaibun(s1) == True:
    if is_kaibun(s2) == True:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Solution (Python):
def is_permutation(s):
    if len(s) == 2 and s[0] != s[1]:
        return False

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

def strong_permutation(s):
    if not is_permutation(s): return False

    last = int((len(s) - 1) / 2)
    s2 = s[:last]
    if not is_permutation(s2): return False

    start = int((len(s) + 3) / 2 - 1)
    s3 = s[start:]
    if not is_permutation(s3): return False

    return True

S = input()
if strong_permutation(S):
    print("Yes")
else:
    print("No")

Solution (Python):


s = input()
n = len(s)
m = (n-1) // 2
k = (n+3) // 2
flag = 1
for i in range(0, n//2):
    if s[i] != s[n-i-1]:
        flag = 0
        break
for i in range(0, m//2):
    if s[i] != s[m-i-1]:
        flag = 0
        break
for i in range(0, (n-k)//2+1):
    if s[i+k-1] != s[n-i-1]:
        flag = 0
        break
if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = list(input())
N = len(S)
rS = [_ for _ in S[::-1]]
S1 = [S[i] for i in range((N-1)//2)]
S2 = [S[i] for i in range((N+1)//2,N)]
rS1 = [_ for _ in S1[::-1]]
rS2 = [_ for _ in S2[::-1]]

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

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

    tmp_s = S.copy()
    tmp_s.reverse()

    if S == tmp_s:
        tmp = S[: (len(S) - 1) // 2]
        tmp_s = tmp.copy()
        tmp_s.reverse()
        if tmp == tmp_s:
            tmp = S[(len(S) + 3) // 2 - 1 :]
            tmp_s = tmp.copy()
            tmp_s.reverse()
            if tmp == tmp_s:
                print("Yes")
                return
    print("No")


if __name__ == "__main__":
    main()

Solution (Python):
s = [i for i in list(input())]

def kaibun(t):
    c = 0
    for i in range(int((len(t) + 1) / 2)):
        if t[i] == t[len(t) - 1 - i]:
            c += 1
    
    if c == int((len(t) + 1) / 2):
        return True
    else:
        return False

f1 = kaibun(s)
f2 = kaibun(s[0:int((len(s) - 1) / 2)])
f3 = kaibun(s[int((len(s) + 1) / 2):len(s)])

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

Solution (Python):
i=input()
N=len(i)
k=0
for j in range (0,N):
    if i[j]!=i[N-1-j]:
        k+=1
for l in range (0,(N-1)//2):
    if i[l]!=i[(N-3)//2-l]:
        k+=1
for m in range (0,(N-1)//2):
    if i[m+(N+1)//2]!=i[N-1-m]:
        k+=1
if k==0:
    print('Yes')
else:
    print('No')

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

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

s = input()
n =int( (len(s)-1)/2)
list = list(s)
list1 = list[0:n]
list2 = list[n+1:2*n+1]

if list1 != list2:
    print('No')
elif isa(','.join(list1)) != 1:
    print('No')
else:
    print('Yes')

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

num = (N-1)/2
num1 = (N+2)/2

if(S[:int(num)]==S[int(num1):]):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()





















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


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

Solution (Python):
s = input()

res = "Yes"
for i in range(len(s)):
    if s[i] != s[-(i+1)]:
        res = "No"
        break

if res == "Yes":
    mx = int((len(s)-1)/2)
    for i in range(mx):
        if s[i] != s[mx-i-1]:
            res = "No"
            break

if res == "Yes":
    mx = len(s)-1
    j = 0
    for i in range(int((len(s)+3)/2)-1, len(s)):
        if s[i] != s[(mx - j)]:
            res = "No"
            break
        j = j + 1

print(res)

Solution (Python):
S=input()

flag_1=0
for i in range(int(len(S)/2)):
    if S[i]==S[len(S)-i-1]:
        flag_1+=1
        
if flag_1==int((len(S)-1)/2):
    if S[int(len(S)/2)-1]==S[0] and S[int(len(S)/2)+1]==S[len(S)-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

ans = 'Yes'
for i in range(0,n//2):
    if str_list[i] != str_list[n//2-i-1]:
        ans = 'No'

for j in range(n//2+1,n):
    if str_list[i] != str_list[-i-1]:
        ans = 'No'

for i in range(n):
    if str_list[i] != str_list[-i-1]:
        ans = 'No'

print(ans)

Solution (Python):
import sys

S = str(input())
N = len(S)

for i in range(N):
    if S[i] != S[N-1-i]:
        print('No')
        sys.exit()

NN = (N-1)//2
for i in range(NN):
    if S[i] != S[NN-1-i]:
        print('No')
        sys.exit()

NNN = (N+3)//2
j = 0
for i in range(NNN-1,N):
    if S[i] != S[N-j-1]:
        print('No')
        sys.exit()
    j += 1

print('Yes')

Solution (Python):
s=list(input())
N=len(s)
if N==3:
  if s[0]==s[2]:
    print("Yes")
  else:
    print("No")
else:
  tmp=s[0:int((N-1)/2)]
  tmp_rev=tmp[::-1]

  tmp2=s[int((N+3)/2)-1:]
  tmp2_rev=tmp2[::-1]

  if tmp==tmp_rev and tmp2==tmp2_rev and s==s[::-1]:
    print("Yes")
  else:
    print("No")

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

front = s[0:int((n-1)/2)]
back = s[int((n+1)/2):]
if front == back[::-1] and front == back:
    print("Yes")
else:
    print("No")

Solution (Python):
S = list(str(input()))
length1 = int((len(S) -1) / 2)
length2 = int((len(S) + 1) / 2)

if S[0:length1] == S[length2:]:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = int((len(S)-1)/2)
flag = 0
for i in range(N):
    if S[i] != S[len(S)-1-i]:
        flag = 1

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

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

n = len(s)

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

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

if palindrome(s) and palindrome(s2) and palindrome(s3):
    print("Yes")
else:
    print("No")

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

n = len(s)
s1 = []
s2 = []
count = 0

for i in range((n-1)//2):
    s1.append(s[i])


for j in range((n + 3)//2 - 1,n):
    s2.append(s[j])

if s == list(reversed(s)) and s2 == list(reversed(s2)) and s1 == list(reversed(s1)):
    count = 1





if count == 1:
    print('Yes')
else:
    print('No')

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

N=math.floor(len(S))
N1=math.floor(((len(S)-1)/2))
N2=math.floor(((len(S)+3)/2)-1)

S1=S[:N1]
S2=S[N2:N]

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

Solution (Python):
import sys
input = sys.stdin.readline
S = input().strip()
Sr=''.join(list(reversed(S)))
N=len(S)
S1=S[:int((N-1)/2)]
S1r=''.join(list(reversed(S1)))
S2=S[int((N+3)/2)-1:]
S2r=''.join(list(reversed(S2)))
if S==Sr and S1 ==S1r and S2==S2r:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()

last=(len(S)-1)//2
S1=S[0:last]

start=(len(S)+3)//2
S2=S[start-1:len(S)]

if S1 == S2:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

S = str(input())
N = len(S)

for i in range(N):
    if S[i] != S[N-1-i]:
        print('No')
        sys.exit()

NN = (N-1)//2
for i in range(NN):
    if S[i] != S[NN-1-i]:
        print('No')
        sys.exit()

NNN = (N+3)//2
j = 0
for i in range(NNN-1,N):
    if S[i] != S[N-j-1]:
        print('No')
        sys.exit()
    j += 1

print('Yes')

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

t = False
if l%4 == 1:
    c_num = int((l-1)/4)
    c_l = s_list[:c_num]
    t_1 = s_list[c_num:2*c_num][::-1]
    t_2 = s_list[2*c_num+1:3*c_num+1]
    t_3 = s_list[3*c_num+1:][::-1]

    if c_l == t_1 == t_2 == t_3:
        t = True

if l % 4 == 3:
    c_num = int((l - 3) / 4)
    c_l = s_list[:c_num]
    t_1 = s_list[c_num+1 :2 * c_num + 1][::-1]
    t_2 = s_list[2 * c_num + 2:3 * c_num + 2]
    t_3 = s_list[3 * c_num + 3:][::-1]

    if (c_l == t_1 == t_2 == t_3) and (s_list[c_num] == s_list[3*c_num+2]):
        t = True

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

Solution (Python):
S = input()
N = len(S)
X = (N-1)//2
flag = True
bun = True
if X%2 == 0:
  bun = False

for i in range((N-1)//2):
  if S[i] != S[-1-i]:
    flag = False
if bun == True:
  for i in range((X-1)//2):
    if S[i] != S[X-i-1]:
      flag = False
  for i in range((X-1)//2):
    if S[X+1+i] != S[-1-i]:
      flag = False
else:
  for i in range(X//2):
    if S[i] != S[X-i-1]:
      flag = False
  for i in range(X//2):
    if S[X+1+i] != S[-1-i]:
      flag = False
    
if N == 5:
  if S[0] != S[1]:
    flag = False
  elif S[-1] != S[-2]:
    flag = False
if flag == False:
  print("No")
else:
  print("Yes")

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    s = lines[0]

    return (s, )


def solve(s, ):

    n = len(s)
    ma = (n - 1) // 2 
    mb = (n + 3) // 2

    def test_text(text):
        if debug:
            log("text=%s" % text)
        n = len(text) 
        m = (n - 1) // 2
        result = True
        for i in range(m+1):
            if debug:
                log('(s[%d], s[%d])=(%s, %s)' % (i, -(i+1), s[i], s[-(i+1)]))
            if text[i] != text[-(i+1)]:
                result = False
                break

        return result

    if debug:
        log("s =%s" % s)
        log("ma=%d, sa=%s" % (ma, s[:ma]))
        log("mb=%d, sb=%s" % (mb, s[mb-1:]))

    result1 = test_text(s) 
    result2 = test_text(s[:ma]) 
    result3 = test_text(s[mb-1:]) 
    if debug:
        log('result1=%s, result2=%s, result3=%s' % (result1, result2, result3))

    result  = 'No'
    if result1 and result2 and result3:
        result = 'Yes'


    
    return result
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
word = list(input())
new_word = list(reversed(word))
front = word[0:int((len(word)-1)/2)] 
new_front = list(reversed(front))
rear = word[int(((len(word)-1)/2)+1):]
new_rear = list(reversed(rear))
ans = 0
if front == new_front and rear == new_rear:
  ans += 1
if word == new_word:
  ans += 1
  
if ans == 2:
  print('Yes')
else:
  print('No')

Solution (Python):
frag=0
a = list(input())
N=len(a)-1
for i in range(int(N/2)):
    if a[i]!=a[N-i]:
        frag=1
        break
if frag==0:
    for i in range(int(N/4)):
        if a[i]!=a[int(N/2-i-1)] or a[N-i]!=a[int(N/2+i+1)]:
            frag=1
            break
if frag==0:
    print('Yes')
else:
    print('No')

Solution (Python):


def palindrome(string): 
    return 0 if string==string[::-1] else 1
    
def main():
    s = input()
    n = int(len(s))

    temp = []
    temp2 = []

    for i in range(int((n-1)/2)):
        temp.append(s[i])
    temp = ''.join(temp)
        
    for i in range(int((n+3)/2)-1, n):
        temp2.append(s[i])
    temp2 = ''.join(temp2)

    if (palindrome(temp) == 0 and palindrome(temp2) == 0) and palindrome(s) == 0:
        print("Yes")
    else: print("No")

if __name__ == '__main__' :
    main()

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

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

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

inS = str(input()) 
N = len(inS)

if(isKaibun(inS) and isKaibun(inS[0:(N-1)//2]) and isKaibun(inS[(N+1)//2:N])):
    print("Yes")
else:
    print("No")

Solution (Python):
n = input()

x = len(n)

if n == n[::-1]:

    if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:

        if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:

            print('Yes')

        else:

            print('No')

    else:

        print('No')

else:

    print('No')

Solution (Python):
S = list(input())
N = int(len(S))
revS = []
S2 = []
revS2 = []

S3 = []
revS3 = []
def check(S,revS,N):
    count = 0
    for i in range(N):
        revS.append(S[N-count-1])
        count += 1
    if S == revS:
        return 1
    else:
        return 0


for i in range(int((N-1)/2)):
    S2.append(S[i])
for i in range(int((N+3)/2)):
    S3.append(S[int((N+3)/2)-1])
if check(S,revS,N) == 1 and check(S2,revS2,len(S2)) == 1 and check(S3,revS3,len(S3)) == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
fi=''
la=''
a=0
b=0
n=len(s)
if(s[:]==s[::-1]):
    for i in range(0,((n-2)//2)+1):
        fi+=s[i]

    for i in range((n+2)//2,n):
        la+=s[i]

    if(fi[:]==fi[::-1]):
        a=1
    if(la[:]==la[::-1]):
        b=1
    if(a==1 and b==1):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
def isPalindrome(s):
  n=len(s)
  i=0
  while(i<=(n-1)/2):
    if s[i]==s[-(i+1)]:
      i+=1
    else:
      return False
  return True

s=input()
n=len(s)

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

if isPalindrome(left) and isPalindrome(right):
  if isPalindrome(s):
    print("Yes")
  else:
    print("No")
else:
  print("No")

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

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

Solution (Python):
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []
rev = []
rev2 = []
rev3 = []

for i in range(N):
  kai.append(S[i])

for i in range(0, int((N - 1) / 2)):
  kai2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  kai3.append(S[i])

kai.reverse()
kai2.reverse()
kai3.reverse()

for i in range(N):
  rev.append(S[i])

for i in range(0, int((N - 1) / 2)):
  rev2.append(S[i])

for i in range(int((N + 3) / 2) - 1, N):
  rev3.append(S[i])

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Solution (Python):
import math

s = input()
n = len(s)
n2 = math.ceil(n/2)
result = 'Yes'

for i in range(n2):
    if s[i] != s[n-1-i]:
        result = 'No'

th = s[math.ceil(((n+3)/2)-1):n]

th_s = len(th)
th_n = math.ceil(th_s/2)



for i in range(th_n):
    if s[i] != s[th_s-1-i]:
        result = 'No'


print(result)

Solution (Python):
s=list(input())
import math
n=len(s)
app=s[0:(n-1)//2]
down=s[(n-1)//2+1:]
a=len(app)
d=len(down)
ans="No"
cnt=0
check1=0
check2=0
if n%4==3:
	for i in range((n-1)//2):
		if s[i]==s[n-1-i]:
			cnt+=1
	for j in range((d-1)//2):
		if down[j]==down[d-1-j]:
			check1+=1
	for k in range((a-1)//2):
		if down[k]==down[a-1-k]:
			check2+=1   
	if cnt==(n-1)//2 and check1==check2==(d-1)//2:
		ans="Yes"
if n%4==1:
	for i in range((n-1)//2):
		if s[i]==s[n-1-i]:
			cnt+=1
	for j in range(d//2):
		if down[j]==down[d-1-j]:
			check1+=1
	for k in range(a//2):
		if down[k]==down[a-1-k]:
			check2+=1   
	if cnt==math.ceil((n-1)/2) and check1==check2==math.ceil((d-1)/2):
		ans="Yes"
print(ans)

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

Solution (Python):
S=list(input())
N=len(S)
def f(ary):
    n=len(ary)
    h=n//2
    A,B=ary[:h],ary[h:]
    if n%2!=0:
        B=ary[h+1:]
    for a,b in zip(A,reversed(B)):
        if a!=b: 
            print('No')
            exit()
f(S)
Sl=S[:(N-1)//2]
Sr=S[(N+3)//2-1:]
f(Sl)
f(Sr)

print('Yes')

Solution (Python):
S = input()


def kai(text):
    if text == text[::-1]:
        return True
    else:
        return False


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

Solution (Python):
s = input()
hs = s[:int((len(s)-1)/2)]
def iskb(s):
    n = len(s)
    k = 1
    for i in range(int((n-1)/2)):
        if s[i] != s[-(i+1)]:
            k = 0
            break
    return k
def iskb2(s):
    n = len(s)
    k = 1
    for i in range(int(n/2)):
        if s[i] != s[-(i+1)]:
            k = 0
            break
    return k

if int((len(s)-1)/2)%2 == 0:
    if iskb(s)+iskb2(hs) == 2:
        print("Yes")
    else:
        print("No")
else:
    if iskb(s)+iskb(hs) == 2:
        print("Yes")
    else:
        print("No")

Solution (Python):
def main():
    S = list(input())
    SR = list(reversed(S))
    if(S != SR):
        print("No")
        return 0
    s = S[0:(len(S)-1)//2]
    sr = list(reversed(s))
    if(s != sr):
        print("No")
        return 0
    print("Yes")

main()