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()
flag = 0
for i in range(len(s)//2):
    if s[i] != s[len(s)-1-i]:
        flag = 1
for i in range((len(s)-1)//2//2):
     if s[i] != s[(len(s)-1)//2-1-i]:
        flag = 1
j = 0
for i in range((len(s)+3)//2-1,len(s)):
    if s[i] != s[len(s)-1-j]:
        flag = 1
    j += 1
if flag == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
S=input()
N=len(S)
S_1=S[0:(N-1)//2]
S_2=S[(N+3)//2:-1]

if S!=S[::-1]:
    print('No')
    exit()
else:
    pass
if S_1!=S_1[::-1]:
    print('No')
    exit()
else:
    pass
if S_2!=S_2[::-1]:
    print('No')
    exit()
else:
    print('Yes')

Solution (Python):

n = input()
a = n[:len(n)//2]
b = n[len(n)//2+1:]
if n == n[::-1]:
    if a == a[::-1]:
        if b == b[::-1]:
            print('Yes')
            exit()
print('No')

Solution (Python):
import sys

s = input()

def check(str):
    l = 0
    r = len(str) - 1
    while l < r :
        if str[l] != str[r]:
            return False
        l += 1
        r -= 1
    return True

if check(s):
    l = 0
    r = (len(s) - 1) // 2
    if check(s[l:r]):
        l = (len(s) + 3) // 2 - 1
        if check(s[l:len(s)]):
            print("Yes")
            sys.exit()
print("No")

Solution (Python):
s = list(input()) 
l = len(s) 
j = l - 1 

for i in range(l // 2):
    if s[i] != s[j]:
        print('No')
        exit(0)
    j -= 1


h = (l + 3) // 2 - 1 
j = h - 2

for h in range(l // 2):
    if s[h] != s[j]:
        print('No')
        exit(0)
    j -= 1

print('Yes')

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

Solution (Python):
def check_palindrome(target):
    reverse_t = target[::-1]
    if reverse_t == target:
        return True
    else:
        return False


s = input()
n = len(s)

if not check_palindrome(s):
    print('No')
    exit()

if not check_palindrome(s[:int((n-1)/2)]):
    print('No')
    exit()

if not check_palindrome(s[int((n+3)/2) - 1:]):
    print('No')
    exit()

print('Yes')

Solution (Python):
def kaibun(s):
    if s==s[::-1]:
        return True
    else:
        return False
s = input()
n = len(s)
if kaibun(s) and kaibun(s[0:(n-1)//2]) and kaibun(s[(n+3)//2-1:n]):
    print('Yes')
else:
    print('No')

Solution (Python):
def f(X):
  if all(X[i] == X[(-1)*(i+1)] for i in range(len(X))) == True:
    return 1
  else:
    return 0

s = list(input())
n = len(s)
A = s[0:int((n-1)/2)]
B = s[int((n+3)/2)-1:n]
if f(s) * f(A)*f(B) == 1:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
def solve():
    S = input()
    N = len(S)
    print('YNeos'[S[:int((N-1)/2)] != S[int((N+1)/2):]::2])


if __name__ == '__main__':
    solve()

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

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

t = s[:n//2]
m = len(t)
for i in range(m//2):
   if t[i] != t[m-1-i]:
      ans = 'No'

t = s[(n+2)//2:]
m = len(t)
for i in range(m//2):
   if t[i] != t[m-1-i]:
      ans = 'No'

print(ans)

Solution (Python):
s=list(input())
left=s[:(len(s)-1)//2]
right=s[(len(s)+1)//2:]

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

if not check(left):
  print('No')
elif not check(right):
  print('No')
elif not check(s):
  print('No')
else:
  print('Yes')

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

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

Solution (Python):

S = input()
N = len(S)

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

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

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

ans='Yes'

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

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

print(ans)

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

Solution (Python):
import sys
S = list(input())
if S == list(reversed(S)):
    if S[:int((len(S)-1)/2)] == list(reversed(S[:int((len(S)-1)/2)])):
        if S[int((len(S)-1)/2)+1:] == list(reversed(S[int((len(S)-1)/2)+1:])):     
            print('Yes')
            sys.exit()
print('No')

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


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

Solution (Python):
s=list(input())
s0=s[:len(s)//2]
s1=s[-len(s)//2+1:]
if s==s[::-1]:
  if s0==s0[::-1] and s1==s1[::-1]:
    print('Yes')
    exit()
print('No')

Solution (Python):
S=input()
S_len=len(S)
flag_1=True
flag_2=True
flag_3=True

for i in range(S_len):
  if S[i]!=S[S_len-1-i]:
    flag_1=False
for i in range(int((S_len-1)/2)):
  if S[i]!=S[int((S_len-1)/2)-1-i]:
    flag_2=False
for i in range(int((S_len-1)/2)):
  if S[int((S_len+3)/2)-1+i]!=S[S_len-1-i]:
    flag_3=False
flag=flag_1*flag_2*flag_3
if flag==True:
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()
ss = s[:len(s) // 2]

ans = "Yes"
if s != s[::-1] or ss != ss[::-1]: ans = "No"

print(ans)

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

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


if x == x[::-1]:
    pre_x = x[:int((l-1)/2)]
    ato_x = x[int((l+1)/2):]
    if pre_x == ato_x:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S=input()
RS=S[::-1]

mae=S[0:(len(S)-1)//2]
Rmae=mae[::-1]


usiro=S[(len(S)+1)//2:len(S)]
Rusiro=usiro[::-1]


if S==RS and mae==Rmae and usiro ==Rusiro:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
s = input()

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

if p_check(s) == True:
    s2 = s[:(len(s) - 1) // 2]
    if p_check(s2) == True:
        s3 = s[(len(s) + 3) // 2 - 1 : len(s)]
        if p_check(s3) == True:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9


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

def main():
    S = input()

    n = len(S)//2
    is_palindrome1 = check_palindrome(S)
    is_palindrome2 = check_palindrome(S[:n])
    is_palindrome3 = check_palindrome(S[n+1:])
    if is_palindrome1 and is_palindrome2 and is_palindrome3:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

X = list(S)
N = len(S)
N2 = int((N - 1) / 2)
N3 = int(((N + 3) / 2) - 1)

X1 = X[0 : N2]
X2 = X[N3 : N]

X10 = list(reversed(X1))
X20 = list(reversed(X2))

if X1 == X10 and X2 == X20 and X1 == X2:
    print('Yes')
else:
    print('No')

Solution (Python):
def actual(s):
    is_palindrome = lambda x: x == x[::-1]

    N = len(s)

    idx1 = int((N - 1) / 2)
    s1 = s[:idx1]

    idx2 = int((N + 3) / 2) - 1
    s2 = s[idx2:]

    if is_palindrome(s) and is_palindrome(s1) and is_palindrome(s2):
        return 'Yes'

    return 'No'

s = input()
print(actual(s))

Solution (Python):

s=input()
n=len(s)

def kai(l,r):
    ss=s[l:r+1]
    nn=len(ss)
    
    if nn==1:
        return 'Yes'
    else:
        for i in range(int((nn-1)/2)):
            if ss[i]==ss[nn-i-1]:
                if i==int((nn-1)/2)-1:
                    return 'Yes'
            else:
                return 'No'
                break

if kai(0,n-1)=='Yes':
    if kai(0,int((n-1)/2)-1)=='Yes':
        if kai(int((n+3)/2)-1,n-1)=='Yes':
           print('Yes')
    else:
        print('No')
else:
    print('No')

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

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

Solution (Python):
import sys

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


def kaibun(s):
    if list(s) == list(reversed(s)):
        return True
    else:
        return False


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

    flag = True
    flag &= kaibun(S)

    s2 = S[0:(N - 1) // 2]
    flag &= kaibun(s2)

    s3 = S[(N + 3) // 2 - 1:N]
    flag &= kaibun(s3)

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


if __name__ == '__main__':
    solve()

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


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

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

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

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

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

Solution (Python):
S = list(input())
A = []
B = []
Triger = 0

if len(S) == 3:
  if S[0] == S[2]:
    print("Yes")
  else:
    print("No")
else:
  for i in range(0,int((len(S)-1)/2)):
    A.append(S[i])
  for j in range(int((len(S)+3)/2-1),len(S)):
    B.append(S[j])
    
  for k in range(len(S)//2):
    if S[k] == S[len(S)-k-1]:
      continue
    else:
      Triger = 1
      break
  for i in range(len(A)//2):
    if A[i] == A[len(A)-i-1]:
      continue
    else:
      Triger = 1
      break
  for j in range(len(B)//2):
    if B[j] == B[len(B)-j-1]:
      continue
    else:
      Triger = 1
      break
  if Triger == 0:
    print("Yes")
  else:
    print("No")

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

Solution (Python):
def is_Palindrome(S):
    T=""
    for s in S:
        T=s+T

    return T==S

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

Solution (Python):
s = input()
s_r = s[::-1]
n = len(s)
a = int((n-1)//2)
f = s[:a:1]
b = s[:a:-1]
b = b[::-1]

if s == s_r and f == b:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

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

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

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

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

Solution (Python):
s = input()

n = len(s)

sl = s[:n//2]

sr = s[n//2+1:]


if sl == sr and sr ==  sr[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

n = len(s)

l = s[:int((n)/2)]
r = s[int((n)/2)+1:]


if l != r:
    print("No")
    exit()

lr = l[::-1]
rr = r[::-1]

if lr != l or rr != r:
    print("No")
    exit()

print("Yes")

Solution (Python):
import sys
s = input()
c= 0
for i in range((len(s))//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]) or s[i]!=s[len(s)-i-1]:
        c = 0
        break
    else:
        c +=1

if c >0:
    print("Yes")
else:
    print("No")

Solution (Python):
a = input()
an = len(a)
dan = an//2

if a[:dan] == a[dan+1:]:
    print("Yes")
else:
    print("No")

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

judg=True
for i in range(len(S)):
    if not S[i]==S[len(S)-i-1]:
        judg=False
        break
if judg==False:
    print('No')
else:
    for i in range(int((len(S)-1)/2)):
        if not S[i]==S[int((len(S)-1)/2)-1-i]:
            judg=False
            break
    if judg==True:
        print('Yes')
    else:
        print('No')

Solution (Python):
def is_palindrome(s):
    n = len(s)
    ok = True
    for i in range(n):
        if s[i] != s[n-i-1]:
            ok = False
    if ok: return True
    else: return False

s = input()
n = len(s)
h = (n-1) // 2
sa = s[0:h]
sb = s[h+1:n]
if is_palindrome(s) and is_palindrome(sa) and is_palindrome(sb):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first == s_first_reverse and s_second == s_second_reverse:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
L=list(input())
N=len(L)
R=N//2
for i in range(R):
  if L[i]!=L[N-1-i]:
    print("No")
    sys.exit()
  elif L[i]!=L[R-1-i]:
    print("No")
    sys.exit()
print("Yes")

Solution (Python):
a = str(input())
b = len(a)
c = int((b-1)/2)
d = int((b+3)/2)

g = a[:c]
h = a[d-1: ]
R = list(reversed(a))
P = ''.join(R)
C = []

for i in range(int(len(g)+1)):
    if i!=0:
        G = g[int(-i)]
        C.append(G)
    


W = []

for I in range(int(len(h)+1)):
    if I!=0:
        H = h[int(-I)]
        W.append(H)
N = ''.join(C)
M = ''.join(W)
if N ==g  and M ==h and a == P :
    print('Yes')
else:
    print('No')

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "Yes"  
NO = "No"  

def solve(S: str):
    N = len(S)
    for i in range(N // 2):
        if S[i] != S[N - i - 1]:
            print(NO)
            return NO
    m = N // 2
    for i in range(m // 2):
        if S[i] != S[m - i - 1]:
            print(NO)
            return NO

    print(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 = str(input())
m = s[::-1]
n = len(s)
c=0
for i in range(int((n-1)/2)):
    if (s[i]!=m[i]):
        print("No")
        c=1
        break

if c==0:
    a = s[:int((n-1)/2)]
    b = s[int((n+1)/2):]
    x = a[::-1]
    y = b[::-1]
    
    

    l = (n+1)/4
        

    for i in range(int(l)):
        if (a[i]!=x[i])or (b[i]!=y[i]):
            print("No")
            c =1
            break
    if(c==0): 
        print("Yes")

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

Solution (Python):
def is_palindrome(s):
    if len(s) > 1:
        i = 0
        n = len(s)-1
        while s[i] == s[n]:
            i += 1
            n -= 1
            if i >= n:
                break
        else:
            return False
        return True
    else:
        return True

s = input()
n = len(s)

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

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

Solution (Python):
s = input()
a = s[:(len(s)-1)//2]
b = s[(len(s)+3)//2-1:]
c1 = s == s[::-1]
c2 = a == a[::-1]
c3 = b == b[::-1]
if all((c1, c2, c3)):
    print('Yes')
else:
    print('No')

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


flag = 1
for i in range(0,(n-1)//2):
    if(i <= (n-1)/2):
        if(s[i] != s[n-i-1] or s[i] != s[(n-1)//2-i-1]):
            print('No')
            sys.exit()

print('Yes')

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

N = len(S)
ans = 'Yes'

for i in range(N):
    if S[i]!=S[N-i-1]:
        ans = 'No'
        break

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

for i in range((N+3)//2,N):
    if S[i]!=S[N-i-1]:
        ans = 'No'
        break
print(ans)

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

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

Solution (Python):
S = input()

if S != S[::-1]:
    print('No')
else:
    first_half = S[0:(len(S)-1) // 2]
    latter_half = S[((len(S)-1) // 2) + 1:]
    if first_half == first_half[::-1] and latter_half == latter_half[::-1]:
        print('Yes')
    else:
        print('No')

Solution (Python):
S = input()

N = len(S)

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

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

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

ans = "Yes"

for x in range(N // 2):
    if S[x] != S[N-x-1]:
        ans = "No"

for x in range(0, (N-1)//2):
    if S[x] != S[(N-1)//2 - 1 - x]:
        ans = "No"

for x in range(0, (N-1)//2):
    if S[(N-1)//2 + 1 + x] != S[N-1-x]:
        ans = "No"

print(ans)

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

Solution (Python):
s=input()
reverse_s=s[::-1]
n=len(s)
s2=s[:(n-1)//2]
reverse_s2=s2[::-1]
s3=s[(n+3)//2-1:]
reverse_s3=s3[::-1]

if reverse_s==s and reverse_s2==s2 and reverse_s3==s3:
    print('Yes')
else:
    print('No')

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

Solution (Python):
import sys
s = list(input())
front, back = list(), list()

repeat = (len(s)-1) // 2
for i in range(repeat):
    if s[i] == s[len(s)-1-i]:
        front.append(s[i])
        back.append(s[len(s)-1-i])
    else:
        print('No')
        sys.exit()

if len(front) % 2 == 0:
    repeat = len(front) // 2
else:
    repeat = (len(front)-1) // 2        

for i in range(repeat):
    if front[i] == front[len(front)-1-i] and back[i] == back[len(back)-1-i]:
        pass
    else:
        print('No')
        sys.exit()
        
print('Yes')

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

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

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

    if is_palindrome(left) and is_palindrome(right) and is_palindrome(s):
        print('Yes')
    else:
        print('No')
resolve()

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

Solution (Python):
s = input()
n = len(s)
palindrome = True
for i in range(int(n/2)):
    if s[i] != s[n-1-i]:
        palindrome = False
        break

doublePalindrome = True
for i in range(int(n/4)):
    if s[i] != s[int(n/2)-1-i] or s[int(n/2)+1+i] != s[n-1-i]:
        doublePalindrome = False
        break

if palindrome and doublePalindrome:
    print("Yes")
else:
    print("No")

Solution (Python):
a=input()

c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
d=a[int((len(a)+3)/2)-1:]
 
if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")

Solution (Python):
a=input()

c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
d=a[int((len(a)+3)/2)-1:]

if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()

N = len(S)
F = S[0 : N//2]
B = S[N//2+1 : N+1]

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

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

Solution (Python):
s = input()
n = len(s)
a = s[:(n-1)//2]
b = s[(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)
T = True
if S != S[::-1]:
    T = False
SS = S[0:int((N - 1) / 2)]
if SS != SS[::-1]:
    T = False
SSS = S[int((N + 3) / 2) - 1:]
if SSS != SSS[::-1]:
    T = False
if T:
    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+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")

Solution (Python):
s = input()

m = []
for i in s:
  m.append(i)
n = len(s)
n1 = int((n-1)/2)
n2 = int((n+3)/2)
ans = 0

for i in range(n1):
  if m[i] != m[n-1-i]:
    print('No')
    break
  else:
    if m[i] != m[n1-1-i]:
      print('No')
      break
    else:
      if m[n2-1+i] != m[n-1-i]:
        print('No')
        break
      else:
        ans += 1
        
if ans == n1:
  print('Yes')

Solution (Python):
S = input()

def func(S):
    mid = 0
    if len(S)%2 == 0:
        mid = len(S)//2-1
        
        for i in range(mid+1):
            if S[i] != S[-i-1]:
                return False
        for i in range(mid//2+1):
            if S[i] != S[mid-i]:
                return False
        for i in range(len(S)//4+1): 
            if S[mid+1+i] != S[-i-1]:
                return False
        return False
    else:
        mid = len(S)//2
        
        for i in range(mid+1):
            if S[i] != S[-i-1]:
                return False
        for i in range(mid//2+1):
            if S[i] != S[mid-i-1]:
                return False
        for i in range(len(S)//4+1): 
            if S[mid+1+i] != S[-i-1]:
                return False
        return True

if func(S):
    print("Yes")
else:
    print("No")

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

left_s = s[:(len(s)-1)//2]
rvs_left_s = left_s[::-1]

right_s = s[(len(s)+3)//2-1:]
rvs_right_s = right_s[::-1]

if s == rvs_s and left_s == rvs_left_s and right_s == rvs_right_s:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
s = input()
def rev(s):
  return ''.join(list(reversed(s)))
N = len(s)
f = s[:int((N-1)/2)]
l = s[int((N+3)/2-1):]
if s == rev(s) and f == rev(f) and l == rev(l):
  print('Yes')
else:
  print('No')

Solution (Python):
def kai(str):
  if str==str[::-1]:return True
  else:return False
s=input()
print('Yes' if kai(s) and kai(s[:(len(s)-1)//2]) else 'No')

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

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

Solution (Python):
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB_num = int((N+3)/2)
SB = S[SB_num-1:]
SB_rev = SB[::-1]

if SF == SB_rev and SF == SF_rev and SB == SB_rev:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
ok = 1
if S != "".join(list(reversed(S))):
    ok = 0

if S[:(N - 1) // 2] != "".join(list(reversed(S[:(N - 1) // 2]))):
    ok = 0

if S[(N + 2) // 2:] != "".join(list(reversed(S[(N + 2) // 2:]))):
    ok = 0

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

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

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

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

N = len(S)
a = (N-1)//2
b = (N+3)//2 - 1

ans = 'No' 
if is_palindrome(S) and is_palindrome(S[:a]) and is_palindrome(S[b:]):
  ans = 'Yes' 

print(ans)

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

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

if S[:N//2] != S[N//2+1:]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = str(input())
n = len(S)
k = n // 2
s1 = S[:k]
s2 = S[-k:]
if S == S[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')

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

x = len(s)

ck = 1
for i in range(x//2):
  if not s[i] == s[x-i-1]:
    ck = 0
    break
  if not s[i] == s[(x-1)//2-i-1]:
    ck = 0
    break
  if not s[i] == s[(x+3)//2+i-1]:
    ck = 0
    break

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

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

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


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

Solution (Python):
def kaibun(A):
    check=1
    for i in range(len(A)//2):
        if A[i]==A[-(i+1)]:
            pass
        else:
            check=check*0
            break
    return check

N=input()
a=kaibun(N)
B=N[0:(len(N)-1)//2]
C=N[(len(N)+3)//2-1:len(N)]
b=kaibun(B)
c=kaibun(C)
if a==1 and b==1 and c==1:
    print("Yes")
else:
    print("No")

Solution (Python):
import math
s = input()
n = len(s)
zen_c = 0
kou_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
for i in range(0, math.floor((zen_l+1)/2)):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    zen_c += 1
print('Yes' if zen_c == math.floor(z/2) and zenhan == kouhan else 'No')

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

if S == S[::-1]:
    ans += 1

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

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

if ans == 3:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
sl=list(reversed(s))
ns="".join(list(reversed(s)))
k=int((len(s)-1)/2)
t=s[:k]
tl=list(reversed(t))
nt="".join(list(reversed(t)))
n=int((len(s)+3)/2)
r=s[n-1:len(s)]
rl=list(reversed(r))
nr="".join(rl)
if s==ns and t==nt and r==nr:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

flag = True

def check(s):
    return s == s[::-1]
    
if not check(s):
    flag = False
    
if not check(s[:len(s)//2]):
    flag = False
    
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
t = (n-1)//2
a = s[0:((n-1)//2)]

b = s[n//2 + 1:]

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

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

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

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

def isKaibun(txt, n):
    for i in range(n):
        if txt[i] == txt[-(i+1)]:
            continue
        else:
            print("No")
            sys.exit()
    return 0

l = len(S)
isKaibun(S, l//2)

l_b = (l-1)//2 
isKaibun(S[:l_b], l_b//2)

l_a = (l+3)//2
isKaibun(S[l_a-1:], (l-l_a)//2)

print("Yes")

Solution (Python):
import math
s = str(input())
m = (len(s) - 1) / 2
c = True
for i in range(math.floor(m / 2)):
    if s[i] != s[int(m-1-i)]:
        c = False
for i in range(math.floor(m / 2)):
    if s[int(m+1+i)] != s[int(len(s)-1-i)]:
        c = False
for i in range(math.floor(m)):
    if s[i] != s[int(math.floor(len(s)-1-i))]:
        c = False
if c:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

def is_kaibun(st):
    return len(st) == 1 or st[:len(st) // 2] == st[-(len(st) // 2):][::-1]

if is_kaibun(s) and is_kaibun(s[:len(s) // 2]) and is_kaibun(s[-(len(s) // 2):]):
    print('Yes')
else:
    print('No')