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)

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

bck = S[int((N+1)/2) : N]

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

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

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

Solution (Python):
def kaibun(s):
  for n in range(len(s)//2):
    if s[n] == s[len(s)-n-1]:
      continue
    else:
      return False
  return True

s = input()


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

Solution (Python):
S=list(input())
N=len(S)
a=False
b=False


if all(S[i]==S[N-i-1] for i in range(N)):
  a=True

if all(S[j]==S[((N-1)//2)-j-1] for j in range((N-1)//2)):
  b=True

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

Solution (Python):
S = input()
N = len(S)
mid = N//2
pal = True
part1 = []

for i in range(0, mid):
    part1.append(S[i])
for i in range(N-1, mid, -1):
    if(S[i] != part1[N-i-1]):
        pal = False

if not(pal):
    print('No')
    exit()

if len(part1) == 1:
    print('Yes')
    exit()
elif len(part1) == 2:
    if part1[0] == part1[1]:
        print('Yes')
        exit()
    else:
        print('No')
        exit()

if len(part1) % 2 == 1:
    S = part1    
    N = len(S)
    mid = N//2
    pal = True
    part1 = []

    for i in range(0, mid):
        part1.append(S[i])
    for i in range(N-1, mid, -1):
        if(S[i] != part1[N-i-1]):
            pal = False
    if(not(pal)):
        print('No')
        exit()
    else:
        print('Yes')
        exit()
else:
    S = part1    
    N = len(S)
    mid = N//2
    pal = True
    part1 = []

    for i in range(0, mid):
        part1.append(S[i])
    for i in range(N-1, mid-1, -1):
        if(S[i] != part1[N-i-1]):
            pal = False
    if(not(pal)):
        print('No')
        exit()
    else:
        print('Yes')

Solution (Python):
import sys
s = sys.stdin.readline().rstrip()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:-(-(l-1)//2)]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)//2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

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

if N == 3:
    if S[0] == S[2]:
        print('Yes')
    else:
        print('No')
    exit()

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

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

Solution (Python):
A = list(input())
A1 = list(reversed(A))

 
B = A[:(len(A)-1)//2]
B1 = list(reversed(B))
 
C = A[(len(A)+3)//2-1:]
C1 = list(reversed(C))
 
if A == A1 and B == B1 and C == C1:
    print("Yes")
else:
    print("No")

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

s1 = [s[i] for i in range((n-1)//2)]
s2 = [s[i] for i in range((n+3)//2-1, n)]

sr = list(reversed(s))
s1r = list(reversed(s1))
s2r = list(reversed(s2))

if s == sr and s1 == s1r and s2 == s2r:
    print('Yes')
else:
    print('No')

Solution (Python):

s = input()
n = len(s)
s_1 = s[:(n-1)//2]
s_2 = s[(n-1)//2 +1:]
s_1_new = ''.join(list(reversed(s_1)))
s_2_new = ''.join(list(reversed(s_2)))
s_new = ''.join(list(reversed(s)))
if s == s_new and s_1 == s_1_new and s_2 == s_2_new:
  print("Yes")
else:
  print("No")

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

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

S = input()
mid = len(S) // 2
if kaibun(S) and kaibun(S[:mid]) and kaibun(S[(mid+1):]):
    print("Yes")
else:
    print("No")

Solution (Python):
S = str(input())
N = int(len(S))
B = S[:(N-1)//2]
C = S[(((N+3)//2)-1):]

if S == S[::-1]:
    if B == B[::-1]:
        if C[::-1] == C:
            print("Yes")
        else:
            print("No")
    else:
            print("No")
else:
            print("No")

Solution (Python):


s = str(input())

n = len(s)

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

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

print(ans)

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

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

    return True


s = input().rstrip()
slen = len(s)
result = is_palindrome(s)
if result:
    bottom = int((slen - 1) / 2)
    s1 = s[:bottom]
    result = is_palindrome(s1)

if result:
    top = int((slen + 3) / 2)
    s1 = s[top - 1:]
    result = is_palindrome(s1)

print('Yes' if result else 'No')

Solution (Python):
S = input()
s = list(S)
p = []
q = []
for i in range(int((len(s)-1)/2)):
    p.append(s[i])
for i in range(int((len(s)-1)/2)):
    q.append(s[len(s)-1-i])
def abc(k):
    x = 1
    for i in range(int((len(s)-1)/2)):
        if k[i] == k[len(k)-i-1]:
            x = x*1
        else:
            x = x*0
    if x == 1:
        return 1
    else:
        return 0
if abc(p) == 1 and abc(q) ==1 and abc(s) == 1:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def yes():
    print("Yes")  


def no():
    print("No")  


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


def solve(S: str):
    N = len(S)

    if not kaibun(S):
        no()
        return

    s = S[:(N-1)//2]
    
    if not kaibun(s):
        no()
        return

    s = S[(N+1)//2:]
    
    if not kaibun(s):
        no()
        return

    yes()
    return


def main():

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math
s = input()
n = len(s)
if s==s[::-1]:
    s_2 = []
    for i in range(math.floor((n-1)/2)):
        s_2 += s[i]
    
    if s_2==s_2[::-1]:
        s_3 = []
        for i in range(math.floor((n+3)/2)-1,n):
            s_3 += s[i]
        if s_3==s_3[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

else:
    print("No")

Solution (Python):
S = str(input())
SS = S[::-1]
N = len(S)
a = int((N-1)/2)
b = int((N+3)/2)
AS = S[:a]
ASS = AS[::-1]
BS = S[b-1:N]
BSS = BS[::-1]
if S == SS and AS == ASS and BS == BSS:
    print('Yes')
else:
    print('No')

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

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


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

Solution (Python):
s = input()

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

n = len(s)


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

Solution (Python):
s = input()
n1 = ''
n2 = ''
for i in range( (len(s)-1)//2 ):
    n1 += s[i]

for i in range((len(s)+2)//2, len(s)):
    n2 += s[i]

if n1 == n2:
    print('Yes')
else:
    print('No')

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


if __name__ == '__main__':
    s = input()
    if sol(s) and sol(s[:(len(s) - 1) // 2]) and sol(s[(len(s) + 2) // 2:]):
        print('Yes')
    else:
        print('No')

Solution (Python):
def kaibun(s):
    n = len(s)
    if s[:int(n/ 2)] == s[:-int(n / 2) - 1:-1]:
        return True
    else:
        return False

s = input()
n = len(s)




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

Solution (Python):


S = input()
N = len(S)

S_1 = S[:((N-1)//2)]
S_2 = S[((N+3)//2)-1:N]

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    s = list(input())
    r_s = list(reversed(s))
    if s != r_s:
        print('No')
        exit()
    n = len(s)
    s1 = s[:(n - 1) // 2]
    r_s1 = list(reversed(s1))
    if s1 != r_s1:
        print('No')
        exit()
    s2 = s[(n + 3) // 2 - 1:]
    r_s2 = list(reversed(s2))
    if s2 != r_s2:
        print('No')
        exit()
    print('Yes')

    
if __name__ == '__main__':
    solve()

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

Solution (Python):
ip=input()

pal=ip[::-1]

a=int((len(ip)-1)//2)
b=int((len(ip)+3)//2)-1
pal1=ip[:a]
pal2=ip[b:]

if ip==pal and pal1==pal1[::-1] and pal2==pal2[::-1]:
    print('Yes',end='')
    
else:
    print('No',end='')

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

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

L=int((len(s)-1)/2)
f1=0
for i in range(L):
 
  
    if s[0+i]==s[len(s)-i-1]:
        pass
   
    else:
        f1+=1
    


LL=L//2
f2=0
if f1==0:
    for j in range(LL):
     
      
        if s[0+j]==s[L-j-1]:
            pass
 
        else:
            f2+=1
  
else:
    f2=1



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

Solution (Python):
s = list(input())
n = len(s)
n_dash = int((n-1)*0.5)
pre = 1
for i in range(n):
    if s[i] == s[n-i-1]:
        pass
    else:
        pre = 0
        break
if pre == 0:
    result = 'No'
else:
    for j in range(n_dash):
        if s[j] == s[n_dash-j-1]:
            result = 'Yes'
        else:
            result = 'No'
            break
print(result)

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

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

kai1 = ''
kai2 = ''

for i in range(len(s1), 0, -1):
    kai1 = kai1+s1[i-1]
for i in range(len(s2), 0, -1):
    kai2 = kai2+s2[i-1]


if s1 == kai1 and s2 == kai2:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
N = len(s)
flag = 0
i = int((N-1)/2)
if s[0:i] == s[i+1:N]:
    flag = 1;
b = ""
for j in range(i):
    b += s[i-j-1]
if b == s[0:i]:
    flag += 1

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

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

Solution (Python):
st = input()

n = len(st)
half = (n-1)//2

if st[0:half] == st[n-1:half:-1]:
  if half%2 == 0:
    qu = half//2
    if st[:qu] == st[half-1:qu-1:-1] and st[half+1:half+qu+1] == st[n-1:half+qu:-1]:
      print("Yes")
    else:
      print("No")  
  else:
    qu = (half-1)//2
    if st[:qu] == st[half-1:qu:-1] and st[half+1:half+qu+1] == st[n-1:half+qu+1:-1]:
      print("Yes")
    else :
      print("No") 

else:
  print("No")

Solution (Python):
S = input()
N = len(S)
P = 0
for i in range ((N-1)//2):
    if S[i] == S[N-1-i]:
        for k in range((N-1)//2):
            if S[k] == S[((N-3)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:
                P = P
            else:
                P += 1
    else:
        P += 1

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

Solution (Python):
S = input()
N = len(S)
P = 0
for i in range (N-1//2):
    if S[i] == S[N-1-i]:
        for k in range((N-1)//2):
            if S[k] == S[((N-1)//2)-k-1] and S[((N+1)//2)+k] == S[N-1-k]:
                P = P
            else:
                P += 1
    else:
        P += 1

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

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

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

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

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

N1 = int((N-1)/2)
N2 = int((N+3)/2)

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]

flag = True
for ss in [s1, s2, s3]:
    ss_l = len(ss)
    for i in range(ss_l):
        if ss[i] != ss[ss_l-i-1]:
            flag = False
            break
    if not flag:
        break

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

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

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

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

s1=s[0:(n-1)//2]
s2=s[(n+1)//2:n]

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+1)//2:n]
if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
  print("Yes")
else:
  print("No")

Solution (Python):

S = input()
N = len(S)

conds1 = (N - 1) // 2
conds2 = (N + 3) // 2
S1 = S[:conds1]
S2 = S[conds2 - 1:]

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

Solution (Python):
S = input()
N = len(S)
a = 0
f = (N-1)//2
for i in range(N):
    if S[i] != S[-i-1]:
        a = 1
for i in range(f):
    if S[i] !=S[f-i-1]:
        a = 1
b = 0
for j in range((N+3)//2-1,N):
    b += 1
    if S[j] != S[N-b]:
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
n = list(input())
 
a = []
b = []
for i in range(int((len(n)-1)/2)):
    a.append(n[i])
for i in range(int((len(n)+3)/2)-1,len(n)):
   b.append(n[i])
 
if a == b:
    print('Yes')
else:
    print('No')

Solution (Python):

S = input()

zen = S[0 : (len(S))//2]

kou = S[(len(S) + 1)//2 : len(S)]
flag = False


def isKai(arg):
  res = True

  
  for i in range(len(arg) // 2):
    if arg[i] != arg[-i-1]:
      
      res = False
      break
  return(res)


if isKai(S) and isKai(zen) and isKai(kou):
  flag = True


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

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

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

for i in range(n//2):
  if S[i] == S[n-1-i]:
    pass
  else:
    print('No')
    break
else:
  s1 = S[0:(n//2)]
  s2 = S[(n//2+1):n]
  for j in range(len(s1)//2):
    if s1[j] == s1[len(s1)-1-j]:
      pass
    else:
      print('No')
      break
  else:
    for k in range(len(s2)//2):
      if s2[k] == s2[len(s2)-1-k]:
        pass
      else:
        print('No')
        break
    else:
      print('Yes')

Solution (Python):
import sys
input = sys.stdin.readline
'''
n, m = map(int, input().split())
n = int(input())
A = list(map(int, input().split()))
S = input().strip()
for test in range(int(input())):
'''
inf = 100000000000000000  

S = input().strip()
n = len(S)
for i in range(n // 4):
    if S[i] != S[n // 2 - i - 1]:
        print("No")
        sys.exit()

for i in range(n // 4):
    if S[i + n // 2 + 1] != S[n // 2 - i + n // 2]:
        print("No")
        sys.exit()
for i in range(n // 2):
    if S[i] != S[n - i - 1]:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
s1 = list(input())
s2 = list(reversed(s1))
n = len(s1)
if s1 == s2:
    s3 = [i for i in s1[0:(n-1)//2]]
    s4 = list(reversed(s3))
    if s3 == s4:
        s5 = [i for i in s1[(n+3)//2-1:n]]
        s6 = list(reversed(s5))
        if s5 == s6:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

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

Solution (Python):
data = input()
n = len(data)
altered = data[0:(n-1)//2]
if data == data[::-1] and altered == altered[::-1]:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
n =int(len(s))
k1 = int((n-1) / 2)
k2 = int((n+3)/2)
median = int(n/2)
x = []
y = []
answer = 0

for i in  range(k1):
  x.append(s[i])

for i in range(k2-1,n):
  y.append(s[i])
  
for i in range(0,median):
  if x[i] == y[i]:
    answer += 1
if answer == median:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
n = len(s)
hn = n//2
flag = True

for i in range(hn):
    if (not s[i] == s[n-i-1]) or (not s[i] == s[hn-i-1]):
        flag = False
        print("No")
        break

if flag:
    print("Yes")

Solution (Python):
S = input()

def isKaibun(X):
  flag = True
  for i in range(len(X) // 2):
    if X[i]  != X[-1 - i]:
      flag = False
      break
  return flag

flag = False
if isKaibun(S):
  if isKaibun(S[0 : len(S) // 2]):
    if isKaibun(S[(len(S) + 1) // 2 : len(S)]):
      flag = True

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

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

def khan(a):
    k = 0
    for i in range(len(a)//2):
        if a[i] == a[-i-1]:
            k += 1
    if k == len(a)//2:
        return True
    else:
        return False

khan(s)

sz = []
sk = []

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

khan(sz)
khan(sk)

if khan(s) and khan(sz) and khan(sk):
    print("Yes")
else:
    print("No")

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


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

  return True


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

if kaibun(S) & kaibun(S1) & kaibun(S2) :
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()

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

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

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

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

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

Solution (Python):
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])
 
word = input()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:]) and palindrome(word)
print("Yes" if issuper else "No")

Solution (Python):
S=input()
t=len(S)
w=int((t-1)/2)
l=int(len(S)/2)
n=int((t+3)/2)

Two=list(S)[0:w]
Three=list(S)[n-1:t+1]
m=int(len(Two)/2)
o=int(len(Three)/2)

count=0
counts=0
countss=0



for i  in range(l):
    if S[i]==S[len(S)-(i+1)]:
        count +=1


for i  in range(m):
    if Two[i]==Two[len(Two)-(i+1)]:
        counts +=1


for i  in range(o):
    if Three[i]==Three[len(Three)-(i+1)]:
        countss +=1

if count==l and counts==m and countss==o:
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
N=len(S)
ls=S
flag=1
for i in range(N):
  if ls[i]!=ls[N-1-i]:
    flag=0
M=(N-1)//2
for i in range(M):
  if ls[i]!=ls[M-1-i]:
    flag=0
if flag==0:
  print('No')
else:
  print('Yes')

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
s = input()
def kai(l):
  n = len(l)
  output = 'Yes'
  for i in range(n//2):
    if l[i] != l[n-i-1]:
      output = 'No'
  return output

ans = kai(s)
if ans == 'Yes':
  ans = kai(s[:len(s)//2])
if ans == 'Yes':
  ans = kai(s[len(s)//2+1:])
print(ans)

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

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

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

Solution (Python):
s = input()
n = len(list(s))
p = s[:(n-1)//2]
t = s[(n+1)//2:]
p1 = ""
t1 = ""
for i in reversed(range((n-1)//2)):
    p1 += p[i]
    t1 += t[i]
if t1 == t and p1 == p and s == t1 + s[(n-1)//2]+p1:
    print("Yes")
else:
    print("No")

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

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

if palindrome(s) == 1 and palindrome(s[:int((i - 1) / 2)]) == 1 and palindrome((s[int((i + 3) / 2) - 1:i])) == 1:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
s_reverse = s[::-1]
a = int((len(s) - 1)/2)
b = s[:a]
c = b[::-1]
if b == c and s == s_reverse:
  print('Yes')
else:
  print('No')

Solution (Python):
import numpy as np
S = list(input())
N = len(S)
A = []
B = []
for i in range((N-1)//2):
    A.append(S[i])
for j in range((N-1)//2):
    B.append(S[((N+3)//2)+(j-1)])

C = list(reversed(A))
D = list(reversed(B))
E = list(reversed(S))

if np.count_nonzero(np.array(A) == np.array(C)) == np.count_nonzero(np.array(B) == np.array(D)) == len(A) and np.count_nonzero(np.array(S) == np.array(E)) == len(S):
    print("Yes")
else:
    print("No")

Solution (Python):
S = list(input())
N = len(S)
for i in range(N // 2):
  if S[i] != S[N - i - 1]:
    print("No")
    exit()
S_earlier = S[0 : (N - 3) // 2 + 1]
S_later = S[(N + 1) // 2 : N]

for j in range(len(S_earlier) // 2):
  if S_earlier[j] != S_earlier[len(S_earlier) - j - 1]:
    print("No")
    exit()
for k in range(len(S_later) // 2):
  if S_later[k] != S_later[len(S_later) - k - 1]:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()

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

n = len(s)



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

Solution (Python):
str1 = input()
val = len(str1)
if len(str1) % 2!= 0:
    if str1 == str1[::-1]:
        half = str1[:int((val-1)/2)]
        shalf = str1[int((val+3)/2) -1:]
        if half == half[::-1] and shalf == shalf[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

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

mae = []
usiro = []
for i in range(int((len(n)-1)/2)):
    mae.append(n[i])
for i in range(int((len(n)+3)/2)-1,len(n)):
    usiro.append(n[i])

if mae == usiro:
    print('Yes')
else:
    print('No')

Solution (Python):
def check_palindrome(s):
    n = len(s)
    n_half = int(n/2)
    for i in range(n_half):
        if s[i] != s[n - 1 - i]:
            return False
    return True
S = input()
N = len(S)
N_half_end = int((N - 1)/2)
S_half_1 = S[:N_half_end]
S_half_2 = S[N_half_end + 1:]
if S_half_1 == S_half_2[::-1]:
    strong_check = True
else:
    strong_check = False
if strong_check:
    strong_check = check_palindrome(S_half_1) and check_palindrome(S_half_2)
if strong_check:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
a = list(S)
L = int(len(a))
t = int(L // 2)
k = int(t // 2)
p = int(t + 2)

while L % 2 == 0:
    S = input()
    a = list(S)
    L = int(len(a))
    t = int(L // 2)
    k = int(t // 2)
    p = int(t + 2)

for i in range(t) :
    if a[i] == a[L - 1 - i]:
        continue
    else:
        print('No')
        break
else:
    for i in range(k):
        if a[i] == a[t - 1 - i]:
            continue
        else:
            print('No')
            break
    else:
        for i in range(k):
            if a[p - 1 + i] == a[L - 1 - i]:
                continue
            else:
                ptint('No')
                break
        else:
            print('Yes')

Solution (Python):
def main():
	s = str(input())
	s_1_mae = list(s[:((len(s)-1) // 2)])

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

	if s_1_mae == list(reversed(s_1_mae)) and s_2 == list(reversed(s_2)) and list(s) == list(reversed(list(s))):
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()

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

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

ans = "Yes"
ind1 = int((N-1)/2)
ind2 = int((N+3)/2)
for i in range(N):
    if S[i] != S[N-i-1] or S[0] != S[ind1-1] or S[ind2-1] != S[N-1]:
        ans = "No"

print(ans)

Solution (Python):
a=input()
b=len(a)
def func(x):
  if x == x[::-1]:
    return 1
  else:
    return 0
if func(a) and func(a[0:(b-1)//2]) and func(a[(b+3)//2-1:]):
  print('Yes')
else:
  print('No')

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

cnt = 0
for i in range(0,N):
	if not S[i] == S[N-1-i]:
		cnt = 1

for i in range(0,(N-1)//2):
	if not S[i] == S[(N-1)//2-1-i]:
		cnt = 1
	
for i in range((N+3)//2,(N-1)//2):
	if not S[i] == S[(N+3)//2-1-i]:
		cnt = 1
		
if cnt == 1:
	print("No")
else:
	print("Yes")

Solution (Python):
s=input()

def judge_palindrome(x):
	if x==x[::-1]:
		return True
	else:
		return False

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

Solution (Python):
S = list(input())
N = len(S)
ok = False
if S != list(reversed(S)):
    print("No")
elif S[: N // 2] == list(reversed(S[: N // 2])):
    print("Yes")
else:
    print("No")

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


def check_kaibun(kaibun):
    n = len(kaibun)
    middle = n // 2
    count = 0
    for i in range(middle):
        if kaibun[i] == kaibun[n - i - 1]:
            count += 1
        else:
            count = 0
            break
    if count == middle:
        return True
    else: 
        return False


left_center = (l-2) // 2
right_center = (l+2) // 2

check0 = check_kaibun(s)
check1 = check_kaibun(s[:left_center + 1])
check2 = check_kaibun(s[right_center:])

if (check0 == True) and (check1 == True) and (check2 == True): 
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

n = len(s)
mid = int((n - 1)/2)
r = s[::-1]

for i in range(mid):
    if s[i] != r[i] or s[i] != s[mid-i-1] or r[i] != r[mid-i-1]:
        print("No")
        exit()

print("Yes")

Solution (Python):
def nyu():
    S= list(map(str,(input())))
    return S


def check(S ):
    Strong_str1 = ""
    Strong_str2 = ""
    Strong_str3 = ""

    for s in range(int(len(S)/2)):
        Strong_str1 += S[s]

    for s in range(int((len(S)+3)/2-1),len(S)):
        Strong_str2 += S[s]

    Strong_str3 = S[::-1]

    
    
    

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


            
S = nyu()
check(S)

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

l_f=s[0:(n-1)//2]
l_e=s[((n+3)//2)-1:n]

def pala(s):
  pr=s[::-1]
  if s==pr:
    return True
  else:
    return False

if pala(s) and pala(l_f) and pala(l_e):
  print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
s=input()
n=len(s)
s1=s[:(n-1)//2]
s2=s[(n+3)//2-1:n]
def kaibun(x):
    ret=1
    for i in range(len(x)//2):
        if x[len(x)-1-i]!=x[i]:
            ret=0
            break
    return ret
if kaibun(s)+kaibun(s1)+kaibun(s2)==3:
    print("Yes")
else:
    print("No")

Solution (Python):
def if_kai(s):
    n = len(s)
    l = 0
    r = n-1
    while(l<n//2):
        if s[l]!=s[r]:
            return 0
        l+=1
        r-=1
    return 1



s = input()
n = len(s)
if not if_kai(s):
    print('No')
    exit()
f = 1
l = 0
r = ((n-1)//2)-1
while(l<r):
    if s[l]!=s[r]:
        print('No')
        exit()
    l+=1
    r-=1
l = ((n+3)//2)-1
r = n-1
while(l<r):
    if s[l]!=s[r]:
        print('No')
        exit()
    l+=1
    r-=1
print('Yes')

Solution (Python):
s = input()
answer = "Yes"
for n in range(int((len(s)-1)/2)):
    if s[n] != s[-(n+1)]:
        answer = "No"
if len(s) % 4 == 1:
    for n in range(int((len(s)-1)/4)):
        if s[n] != s[int((len(s)-1)/2-1-n)]:
            answer = "No"
if len(s) % 4 == 3:
    for n in range(int((len(s)-3)/4)):
        if s[n] != s[int((len(s)-1)/2-1-n)]:
            answer = "No"
print(answer)

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

s_reverse = s[::-1]

s1 = s[::int((n-1)/2)]
s1_reverse = s1[::-1]

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

if (s==s_reverse) and (s1==s1_reverse) and (s2==s2_reverse):
    print('Yes')
else:
    print('No')

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

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