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

n=len(S)

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

A=S[0:a]
B=S[b-1:n]

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

Solution (Python):
import sys
import numpy as np

s = input()

while True:
    if (s != s[::-1]):
        print("No")
        break
    end = (len(s)-1) // 2
    e1 = s[:end]
    if (e1 != e1[::-1]):
        print("No")
        break
    start = (len(s)+3) // 2 - 1
    e2 = s[start:]
    if (e2 != e2[::-1]):
        print("No")
        break
    print("Yes")
    break

Solution (Python):
if __name__ == '__main__':

    s = list(input())
    sr = list(reversed(s))
    a = s[0:(len(s) - 1) // 2]
    b = s[(len(s) + 3) // 2 - 1:]
    if s == sr and a == b:
        print("Yes")
    else:
        print("No")

Solution (Python):
str = input()

if str != str[::-1]:
    print("No")
else:
    fstr = str[:(len(str)-1)//2]
    tstr = str[(len(str)+3)//2-1:]

    if fstr == fstr[::-1] and tstr == tstr[::-1]:
        print("Yes")
    else:
        print("No")

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

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

Solution (Python):
from sys import stdin
import math
import fractions

s = stdin.readline().rstrip()
rs = s[::-1]
n = int((len(s) - 1) / 2)
s2 = s[0:n]
rs2 = s2[::-1]
n2 = int((len(s) + 3) / 2) - 1
n22 = int(len(s))
s3 = s[n2:n22]
rs3 = s3[::-1]

if s == rs and s2 == rs2 and s3 == rs3:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
s_list = list(s)
check = False
if s_list == s_list[::-1]:
  s_list_mae = s_list[ : len(s_list)//2 ]
  s_list_usiro = s_list[len(s_list)//2 + 1 : ]
  if s_list_mae == s_list_mae[::-1] and s_list_usiro == s_list_usiro[::-1]:
    check = True
if check == True:
  print("Yes")
else:
  print("No")

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

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

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

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

Solution (Python):
import copy
s = input()

mae = s[:len(s) // 2]
ushiro = s[len(s) // 2 + 1:]
ushiro2 = copy.deepcopy(ushiro[::-1])

if mae == ushiro:
    print('Yes')
else:
    print("No")

Solution (Python):
from sys import exit
S = input()
N = len(S)
if S != S[::-1]:
    print("No")
    exit()
if S[:(N - 1) // 2] != S[:(N - 1) // 2:-1]:
    
    print("No")
    exit()
if S[(N + 3) // 2 - 1:] != S[(N + 3) // 2 - 1:][::-1]:
    
    print("No")
    exit()
print("Yes")

Solution (Python):
a_str = input()
r_str = a_str[::-1]
n = (len(a_str) - 1) // 2

head = a_str[0:n]
back = a_str[len(a_str) - n:]

if a_str == r_str:
    if head == head[::-1] and back == back[::-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
from sys import stdin


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




S = stdin.readline().rstrip().split()[0]

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


if is_kaibun(S) is True:
    if is_kaibun(s1) is True:
        if is_kaibun(s2) is True:
            print("Yes")
            exit(0)
print("No")

Solution (Python):
s = input()
l = len(s)
def test(s):
    l = len(s)
    sub = l//2
    return s[:sub][::-1] == s[-1*sub:]
if test(s[:(l-1)//2]) and test(s):
    print('Yes')
elif l == 3 and test(s):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    s = ns()
    n = len(s)
    mid = s[:(n - 1) // 2]
    san = s[(n + 3) // 2 - 1:]
    
    if s == s[::-1]:
        if mid == mid[::-1]:
            if san == san[::-1]:
                print("Yes")
                return
    print("No")    


if __name__ == '__main__':
    main()

Solution (Python):
import sys

s=input()
s=list(s)

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

kaibun=True
for i in range(m):
    if s[N-1-i]!=s[i] or s[i]!=s[m-i-1] or s[N-1-i]!=s[m+1+i]:
        kaibun=False
        break

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

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

def ispalindrome(str): return 1 if str == str[::-1] else 0

s_2 = s[:int((l-2)/2+1)]
s_3 = s[int((l+3)/2-1):]

if ispalindrome(s) == 1 and ispalindrome(s_2) == 1 and ispalindrome(s_3) == 1: 
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

s1 = S[0]
index_f = (len(S)-1)/2
s2 = S[int(index_f)-1]

index_o = (len(S)+3)/2
s3 = S[int(index_o) - 1]
index_l = len(S) - 1
s4 = S[int(index_l)]

ans = 'No'

s_f = S[0:int(index_f)]
s_l = S[int(index_o) - 1:]








if (s_f == s_l) and (s1 == s2) and (s3 == s4):
    ans = 'Yes'

print(ans)

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


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

a = kai[:int(len(kai)/2)]

for i in range(len(a)):
    if a[i] != a[-i-1]:
        flag = 1
b = kai[int(len(kai)/2)+1:]

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

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

Solution (Python):
s = input()


def is_kaibun(s):
    """
    if len(s) == 1:
        return True

    l = [0] * (ord("z") - ord("a") + 1)
    for c in s:
        l[ord(c)-ord("a")] += 1

    odd_cnt = 0
    for i in range(len(l)):
        if l[i] % 2 == 1:
            odd_cnt += 1
            if odd_cnt >= 2:
                return False
    return True
    """
    rev_s = s[::-1]
    if rev_s == s:
        return True
    else:
        return False


n = len(s)
if len(s) < 3:
    print("No")
elif is_kaibun(s) and is_kaibun(s[:(n-1) // 2]) and is_kaibun(s[(n+3)//2-1:]):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
reS = S[::-1]
if S != reS:
    print("No")
    exit()
N = len(S)
minS = S[:(N - 1) // 2]
minreS = minS[::-1]
maxS = S[(N + 2) // 2:]
maxreS = maxS[::-1]
if minS == minreS and maxS == maxreS:
    print("Yes")

else:
    print("No")

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


def main():
    s = input()
    s = s.strip()
    n = len(s)
    a = s[0:(n-1)//2]
    b = s[(n+3)//2-1:n]

    for i in range(n//2):
        if s[i] != s[n-i-1]:
            print('No')
            return

    for i in range(len(a)//2):
        if a[i] != a[len(a)-i-1]:
            print('No')
            return

    for i in range(len(b)//2):
        if b[i] != b[len(b)-i-1]:
            print('No')
            return

    print('Yes')


main()

Solution (Python):
x = input()
n= len(x)
if x[:int((n-1)/2)] == x[int((n+3)/2)-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().rstrip('\n')
N = len(S)

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

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

N = len(S)
flag = 0

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

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

for k in range(int((N - ((N+3)/2)))):
    if S[int((N+3)/2 -1)] != S[N-i-1]:
        flag = 1
        break

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

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


def b():
    S = str(input())
    N = len(S)
    k1 = is_kaibun(S)
    k2 = is_kaibun(S[:int((N-1)/2)])
    k3 = is_kaibun(S[int((N+1)/2):])

    if (k1 and k2 and k3):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    b()

Solution (Python):
S = list(input())
N = len(S)
flg = True
for i in range((N-1)//2):
  if S[i] != S[N-1-i]:
    flg = False
for i in range((N-1)//4):
  if S[i+((N+3)//2)-1] != S[N-1-i]:
    flg = False
    
if flg:
  print("Yes")
else:
  print("No")

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

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


s = input()
l = len(s)
x = int((l - 1) / 2)
y = int((l + 3) / 2)


if func(s) and func(s[:x]) and func(s[y - 1 :]):
    print("Yes")
else:
    print("No")

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

st = s[0:int((n-1)/2)]
en = s[int((n+3)/2)-1:n]

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

Solution (Python):




def main():
  s = list(input())
  n = len(s)
  m = (n-1)//2
  l = (n+3)//2
  
  
  f = s==s[::-1]
  
  t = s[:m]
  
  g = t == t[::-1]
  
  r = s[l-1:]
  
  h =  r == r[::-1]
  
  
  
  if f and g and h:
    print('Yes')
  else:
    print('No')
		

if __name__=='__main__':
    main()

Solution (Python):
from copy import copy
s = list(input())

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

judge1 = s[::-1] == s
judge2 = sa[::-1] == sa
judge3 = sb[::-1] == sb

if judge1 and judge2 and judge3:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

for i in range(len(s)//2):
    if s[i] == s[-i-1]:
        continue
    else:
        print("No")
        exit()
        
s_f = s[:len(s)//2]
s_b = s[len(s)//2 + 1:]


for i in range(len(s_f)//2):
    if s_f[i] == s_f[-i-1]:
        pass
    else:
        print("No")
        exit()
    
    if s_b[i] == s_b[-i-1]:
        pass
    else:
        print("No")
        exit()
else:
    print("Yes")

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


def isloop(S):
    i = 0
    N = len(S)
    if i == N-1-i:
        return True
    while S[i] == S[N-1-i]:
        i += 1
        if i == N-1-i or i == N-i:
            return True
    return False


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

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


def resolve():
    S = list(input())

    if not ispalindrome(''.join(S)):
        print('No')
        return

    num = len(S)
    half = num // 2

    half_1 = S[0:half]
    half_2 = S[half + 1:]

    if not ispalindrome(''.join(half_1)):
        print('No')
        return

    if not ispalindrome(''.join(half_2)):
        print('No')
        return

    print('Yes')


resolve()

Solution (Python):
s = input()
flag = True
l = len(s)
if s != s[::-1]:
    flag = False
    

if s[:(l-1)//2] != s[:(l-1)//2][::-1]:
    flag = False
    

if s[(l+3)//2-1:] != s[(l+3)//2-1:][::-1]:
    flag = False
    

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

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

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

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

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

N = len(S)
flag = False
if palindrome(S) == 0:
    if palindrome(S[:int((N - 1)/2)]) == 0:
        if palindrome(S[int((N + 3)/2 - 1):]) == 0:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
answer = 'Yes'
N = len(S)
S2 = S[0:(N-1)//2]
N2 = len(S2)
S3 = S[(N+3)//2-1:]
N3 = len(S3)
for i in range(N//2):
  if ( S[i] == S[-(i+1)]):
    answer = 'Yes'
  else:
    answer = 'No'
    break
if answer == 'Yes':
  for i in range(N2//2):
    if( S2[i] == S2[-(i+1)] and S3[i] == S3[-(i+1)]):
      answer = 'Yes'
    else:
      answer = 'No'
      break
print(answer)

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

ans = 'Yes'
for i in range(n//2):
  if s[i] != s[-i-1] or s[i] != s[-i-1+int((n-1)/2)] or s[i+int((n+1)/2)] != s[-i-1]:
  	ans = 'No'

print(ans)

Solution (Python):
def isp(s): 
    rev = ''.join(reversed(s)) 
    if (s == rev): 
        return True
    return False
x=input()
y=len(x)
a=(len(x)-1)//2
b=(len(x)+3)//2
if(isp(x) and isp(x[:a]) and isp(x[b-1:])):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if s != s[::-1]:
    print('No')
    exit(0)
n = len(s)
ss = s[:(n-1)//2]

if ss != ss[::-1]:
    print('No')
    exit(0)
sss = s[(n+3)//2-1:]

if sss!=sss[::-1]:
    print("No")
    exit(0)
print("Yes")

Solution (Python):
"""def power(x, y): 
    res = 1
    x=x
    while (y > 0): 
        if ((y & 1) == 1) : 
            res = (res * x) 
        y = y >> 1
        x = (x * x)
    return res""" 
"""def fact(n):
    if(n==0):
        return 1
    if(n==1):
        return 1
    return fact(n-1)+fact(n-2)"""

import math




arr=list(input().strip())


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

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

    N = len(S)

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

    S2 = S[0:int(N/2)]
    N2 = len(S2)

    for i in range(int(N2/2)):
        if S2[i] != S2[i*-1-1]:
            print('No')
            exit()

    S3 = S[int((N+3)/2)-1:]
    N3 = len(S3)

    for i in range(int(N3/2)):
        if S3[i] != S3[i*-1-1]:
            print('No')
            exit()

    print('Yes')

if __name__ == "__main__":
    main()

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    N = int(len(S))
    ans = YES

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

    S_left, S_right = S[:N//2], S[N//2 + 1:]

    for i in range(N//2//2):
        if S_left[i] != S_left[-1 - i]:
            ans = NO
            break
        if S_right[i] != S_right[-1 - i]:
            ans = NO
            break
    print(ans)



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)
l=int((N-1)/2)
ans="Yes"
for i in range(l):
    if(S[i]!=S[N-1-i]):
        ans="No"
Smae=S[0:l]
Susi=S[l+1:N]
m=int(((N-1)/2)/2)
for i in range(m):
    if(Smae[i]!=Smae[l-1-i]):
        ans="No"
    if(Susi[i]!=Susi[l-1-i]):
        ans="No"
print(ans)

Solution (Python):



def isKaibun(a):
    for i in range(int(len(a)/2)):

        if a[i]!=a[len(a)-i-1]:

            return 0
    return 1
a = input()

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

Solution (Python):
def checkStr(str):
  n = len(str)
  if n % 2 == 0:
    for i in range(int(n/2)):
      if str[i] != str[n-i-1]:
        return False
  else:
    for i in range(int((n-1)/2)):
      if str[i] != str[n-i-1]:
        return False
  return True


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

Solution (Python):
S=input()
lens=len(S)
half=lens//2
haha=half//2
if lens%2==0:
    if S[:half]==S[half:]:
        if half%2==0:
            if S[:haha]==S[haha:half][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if S[:haha]==S[haha+1:half][::-1]:
                print('Yes')
            else:
                print('No')
    
else:
    if S[:half]==S[half+1:]:
        if half%2==0:
            if S[:haha]==S[haha:half][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if S[:haha]==S[haha+1:half][::-1]:
                print('Yes')
            else:
                print('No')
    else:
        print('No')

Solution (Python):
s = input().split()[0]
n = len(s)
l = s[:n//2]
r = s[n//2+1:]
cnt = 0
for i in range(n//2):
    if l[i] == l[n//2 - 1 - i]:
        cnt += 1
    if r[i] == r[n//2 - 1 - i]:
        cnt += 1
if l == r and cnt == n - 1:
    print('Yes')
else:
    print('No')

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

    for i in range(n // 2):
        if s[i] != s[n - 1 - i]:
            print("No")
            return
    
    for i in range((n - 1) // 2):
        if s[i] != s[(n - 1) // 2 - 1 - i]:
            print("No")
            return
    
    for i in range((n + 3) // 2, n):
        if s[i] != s[n - 1 - i]:
            print("No")
            return
    
    print("Yes")

    return

if __name__ == "__main__":
    solve()

Solution (Python):
S = input()

if S == S[::-1]:
    rhalf = S[0:int((len(S)-1)/2)]
    if rhalf == rhalf[::-1]:
        lhalf = S[int((len(S)+3)/2)-1:]
        if lhalf == lhalf[::-1]:
            print('Yes')
            exit()
print('No')

Solution (Python):
S=str(input())
N=len(S)
M=int((N-1)/2)
f=True
L=""
for i in range(M):
	if S[i]!=S[-i-1]:
		f=False
	else:
		L+=S[i]	
for i in range(int(len(L)//2)):
	if L[i]!=L[-i-1]:
		f=False
if f==False:print("No")
else:print("Yes")

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

res = True 

for i in range(1, (N - 1)//2):
  if S[i - 1] == S[N - i]:
    if i < (N - 1) / 2:
      if S[i - 1] != S[(N - 1) // 2 - i]:
        res = False 
        break 
  else:
    res = False 
    break 
print("Yes" if res else "No")

Solution (Python):
a = input()
def p(s,n):
    for i in range(n//2):
        if s[i] != s[-(i+1)]:
            return 0
    return 1
r = len(a)
if p(a,r) == 1 and p(a[:((r-1)//2)],(r-1)//2) == 1 and p(a[(r+3)//2-1:],r-(r+3)//2+1)== 1:
    print("Yes")
else:
    print("No")

Solution (Python):
def ensure(s):
    flag = 0
    c = len(s)//2
    for i in range(c):
        if s[i]!=s[-1*(i+1)]:
            flag = 1
            continue
    return flag

S = input()
N = len(S)

flag1 = ensure(S)

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

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

ans = 'Yes' if flag1==0 and flag2==0 and flag3==0 else 'No'
print(ans)

Solution (Python):
S = input()
l = int(len(S)/2)
front = S[:l]
back = S[(l+1):]


if list(front) == list(reversed(back)) and list(front) == list(reversed(front)) and list(back) == list(reversed(back)):
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
a=(len(s)-1)//2-1
b=[]
for i in range(0,a):
    if s[i]!=s[len(s)-i-1]:
        b.append(1)
    elif s[i]!=s[a-i]:
        b.append(1)
    else:
        b.append(0)
if 1 in b:
    print("No")
else:
    print("Yes")

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

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

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

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

Solution (Python):
def kaibun(s):
    flag = 1
    ss = list(s)
    sss = ss.copy()
    ss.reverse()
    if sss != ss:
        flag = 0
    return flag

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

if kaibun(S)+kaibun(s1)+kaibun(s2) == 3:
    print("Yes")
else:
    print("No")

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

print("Yes" if a*b*c == 1 else "No")

Solution (Python):
import numpy as np
import fractions
import decimal
from collections import deque

s=str(input())
a=s[:(len(s)-1)//2]

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

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

print("Yes")

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

Solution (Python):
s = input()
n, m = len(s), (len(s)-1) // 2
for i in range(m//2+1):
    if not s[i] == s[m-1-i] == s[m+1+i] == s[n-1-i]:
        print('No')
        break
else:
    print('Yes')

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

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

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

Solution (Python):


s = input()
a = s[::-1]
if s == a:
    t = s[0:(len(s)-1)//2]
    b = t[::-1]
    if t == b:
        u = s[(len(s)+3)//2-1:]
        c = u[::-1]
        if u == c:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
import sys,math
sys.setrecursionlimit(10**9)
from collections import defaultdict
 
IA = lambda: map(int,input().split())
IAS= lambda: map(str,input().split())
 
s=input()

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

if len(s)%2==0:
    print("No")
else:
    if check(s)==0:
        print("No")
    else:
        n=len(s)
        s1=[s[i] for i in range(0,n//2)]
        s2=[s[i] for i in range(n//2+1,n)]
        if check(s1)==1:
            print("Yes")
        else:
            print("No")

Solution (Python):
hoge=input()
n=len(hoge)
if(hoge!=hoge[::-1]):
  print("No")
  exit()
aaa=hoge[1+n//2:]
bbb=hoge[:n//2]
ccc=aaa[::-1]
ddd=bbb[::-1]
if(aaa==ccc and bbb==ddd):
  print("Yes")
else:
  print("No")

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

judge = 'Yes'

index_left = (N - 1) // 2
index_right = (N + 3) // 2

kaibunn_left = list(S[:index_left])
kaibunn_right = list(S[index_right - 1 :])


for i in range(N):
    s = list(S)
    s_begin = s[i]
    s_end = s[N - 1 - i]
    
    if (s_begin != s_end):
        judge = 'No'
        break


for i in range(index_left):
    n = len(kaibunn_left)
    s_begin = kaibunn_left[i]
    s_end = kaibunn_left[n - 1 - i]
    
    if (s_begin != s_end):
        judge = 'No'
        break


for i in range(len(kaibunn_right)):
    n = len(kaibunn_right)
    s_begin = kaibunn_right[i]
    s_end = kaibunn_right[n - 1 - i]
    
    if (s_begin != s_end):
        judge = 'No'
        break

print(judge)

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

s1 = S[0:(N-1)//2]
s2 = S[((N+3)//2)-1:]
s1_r = ''.join(list(reversed(s1)))
s2_r = ''.join(list(reversed(s2)))

ans = 'No'

if s1==s2==s1_r==s2_r:
    ans = 'Yes'

print(ans)

Solution (Python):
a = input()
ju = True
n=len(a)
for i in range(n):
	if a[i] != a[-i-1]:
		ju=False
		
m=int((n-1)/2)
for i in range(m):
	if a[i] != a[m-1-i]:
		ju=False
		
l=int((n+3)/2)
l2= n-l+1
for i in range(l2):
	if a[l-1+i] != a[-i-1]:
		ju=False

if ju==False:
	print("No")
else:
	print("Yes")

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

be = int((N-1)/2)
af = int((N+3)/2-1)

for i in range(be):
  if S[i] != S[be-1-i]:
    flag = 1
    break
  
for i in range(af, N):
  if S[i] != S[N-1-i]:
    flag = 1
    break

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

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

x = int((N-1)/2) - 1
y = int((N+3)/2) - 1

S_lead = S[0: x + 1]
S_end = S[y : N+1]

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

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

for i in range(n):
    if s[i] != s[n - i - 1]:
        print("No")
        exit()
        
aa = math.floor((n - 1) / 2)
bb = math.ceil((n + 3) / 2)
a = s[0:aa]
b = s[bb - 1:n]

alen = len(a)
blen = len(b)

for i in range(alen):
    if a[i] != a[alen - i - 1]:
        print("No")
        exit()

for i in range(blen):
    if b[i] != b[blen - i - 1]:
        print("No")
        exit()

print("Yes")

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

h = S[0:((N-1)//2)]
ah = S[((N+3)//2 -1):]

if h == ah:
    hh = h[0:len(h)//2]
    flg = True
    for i in range(len(hh)):
        if not hh[i] == h[-(i+1)]:
            flg = False
            break
    if flg:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

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

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

Solution (Python):
S = input()
l = len(S)
flag = 0
half = l // 2

for i in range(l):
  if S[i] != S[l - 1 - i]:
    flag = 1
    
for i in range(half // 2):
  if S[i] != S[half - 1 - i]:
    flag = 1
    
for i in range(half // 2):
  if S[half + 1 + i] != S[l - 1 - i]:
    flag = 1
    
if flag == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
  s = input()
  n = len(s)
  first = s[:(n-1)//2]
  last = s[((n+3)//2)-1:]
  if first != last:
    print('No')
    exit(0)
  print('Yes')
  
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def input_list():
  return list(map(int, input().split()))

def input_list_str():
  return map(str, input().split())

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

import math
import fractions
import collections
from functools import reduce
main()

Solution (Python):
s = input()
l = (len(s)-1)//2
rs = s[::-1]
if s[:l] == rs[:l]:
    l = len(s)//2
    ns1 = s[:l]
    ns2 = s[l+1:len(s)]
    if ns1 == ns1[::-1]:
        if ns2 == ns2[::-1]:
            print("Yes")
            exit()
print("No")

Solution (Python):
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

S = read_str()

def solve():
    ans = 0
    N = len(S)
    s1 = S[0: (N - 1) // 2]
    s2 = S[(N + 3) // 2 - 1 :N]
    if S != S[::-1]:
        return 'No'
    if s1 != s1[::-1]:
        return 'No'
    if s2[::-1] != s2[::-1]:
        return 'No'
    return 'Yes'

if __name__ == "__main__":
    print(solve())

Solution (Python):
S=str(input())
N=len(S)
T=S[0:int((N-1)/2)]
U=S[int((N+1)/2):N]
B=0
for i in range(len(T)):
 if T[i]==T[len(T)-1-i]:
  B+=1
if B==len(T) and T==U:
 print("Yes")
else:
 print("No")

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

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

S1 = S[:(len(S)-1)//2]
S2 = S[(len(S)+3)//2-1:]
if check(S) and check(S1) and check(S2):
  print("Yes")
else:
  print("No")

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

s = S[::-1]
X=S[:int((N-1)/2)]
x = X[::-1]
Y=S[int((N+3)/2)-1:]
y = Y[::-1]

if S==s and X==x and Y==y:
  print('Yes')
else:
  print('No')

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

ans = 'Yes'

if s != s[::-1]:
    ans = 'No'
if s1 != s1[::-1]:
    ans = 'No'
if s2 != s2[::-1]:
    ans = 'No'

print(ans)

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


s = input()
n = len(s)
flag = palindrome(s) and palindrome(
    s[0:((n - 1) // 2)]) and palindrome(s[(n + 3) // 2 - 1:])

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

Solution (Python):
stri = list(input())
hantei = 0
hant = 0
han = 0
N = len(stri)

for i in range(int((N-1)/2)):
    if stri[i] != stri[N-i-1]:
        hantei = 1
        break

stri1 = stri[:int((N-1)/2)]
stri2 = stri[int((N-1)/2)+1:]


for i in range(len(stri1)):
    if stri1[i] != stri1[len(stri1)-i-1]:
        hant = 1
        break

for i in range(len(stri2)):
    if stri2[i] != stri2[len(stri2)-i-1]:
        han = 1
        break

if hantei == 0 and hant == 0 and han == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
one = s + s
two = s[:(n-1)//2] 
theree = s[(n+3)//2 -1:] 

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