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):

"""
Created on Sun Jan 19 20:52:57 2020

@author: over-
"""

S=input()
N=len(S)

ans="Yes"

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

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

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

print(ans)

Solution (Python):
s = input()


def is_even(n):
    return 0 == n % 2


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


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

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

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

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

if s[:len(s)//2]==s[1+len(s)//2:]:
    fi=list(s[:len(s)//2])
    fis = copy.copy(fi)
    fis.reverse()
    se=list(s[1+len(s)//2:])
    ses = copy.copy(se)
    ses.reverse()
    if fi==fis and se==ses:
            print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
a = input()

N = len(a)
t = int((N-1)/2) 
hantei = True

for i in range(t):
  if a[i] == a[t-1-i]:
    hantei = True
  else:
    hantei = False

if hantei == False:
  print("No")
else:
  b = a[:t+1] + a[:t]
  if a == b:
    print("Yes")
  else:
    print("No")

Solution (Python):
import sys
from math import sqrt
from collections import Counter

input = sys.stdin.readline


def I():
    return int(input())


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


def LI():
    return list(MI())


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    s = input().rstrip()

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


if __name__ == "__main__":
    main()

Solution (Python):

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

Solution (Python):
S = input()
N = len(S)
K = (N-1)//2
L = (N+3)//2
P = S[0:K]
Q = S[L-1:N]
if P == Q:
    print("Yes")
else:
    print("No")

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

ans = "Yes"
for i in range(len(S)):
    if S[i]!=S_re[i]:
        ans = "No"
        break
S_re1 = S[0:(len(S)-1)//2][::-1]
S_re2 = S[len(S)//2+1:len(S)][::-1]

for i in range(len(S_re1)):
    if S[i]!=S_re1[i]:
        ans = "No"
        break
for i in range(len(S)//2+1, len(S_re2)):
    if S[i]!=S_re2[i]:
        ans = "No"
        break
print(ans)

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

Solution (Python):



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


def main():
    s = input()
    i = len(s)

    check_1 = s[:int((i - 1) / 2)]
    check_2 = s[int(((i - 1) / 2) + 1):]
    if is_kaibun(s) and is_kaibun(check_1) and is_kaibun(check_2):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
def ispari(s):
  a = 0
  b = len(s) - 1
  while a < b:
    if not s[a] == s[b]:
      return False
    a += 1
    b -= 1
  return True

S = input()
N = len(S)
S_1 = S[:(N - 1)// 2]
S_2 = S[(N+3)//2 -1:]
if ispari(S) and ispari(S_1) and ispari(S_2):
  ret = 'Yes'
else:
  ret = 'No'
print(ret)

Solution (Python):
s = input()
n = len(s)
ans = "No"

sa = s[:(n-1)//2]
sb = s[((n+3)//2)-1:]

if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    ans = "Yes"

print(ans)

Solution (Python):
from math import ceil

S = input()
N = len(S)
b = S[:ceil((N - 1) / 2)]
c = S[ceil((N + 3)/2)-1:]


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

Solution (Python):
def inp():
    return input()
def iinp():
    return int(input())
def inps():
    return input().split()
def miinps():
    return map(int,input().split())
def linps():
    return list(input().split())
def lmiinps():
    return list(map(int,input().split()))
def lmiinpsf(n):
    return [list(map(int,input().split()))for _ in range(n)]

s = inp()

n = len(s)

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

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

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

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

print("Yes")

Solution (Python):
s=list(input())
n=len(s)
a=(n-1)//2
b=(n+3)//2
ans=0
ss=[]
for i in range(a):
    ss.append(s[i])
if a%2==0:
    aa=a//2
    for i in range(aa):
        if ss[i]!=ss[-(i+1)]:
            ans=1
            break
else:
    aa=(a-1)//2
    for i in range(aa):
        if ss[i]!=ss[-(i+1)]:
            ans=1
            break
if ans==0:
    al=n-(b-1)
    if al%2==0:
        bb=al//2
        for i in range(b-1,n):
            if s[i]!=s[-(i+1)]:
                ans=1
                break
    else:
        bb=(al-1)//2
        for i in range(b-1,n):
            if s[i]!=s[-(i+1)]:
                ans=1
                break
print("Yes" if ans==0 else "No")

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

Solution (Python):
def ispal(a):
    z=[]
    for i in range(len(a)-1,-1,-1):
        z.append(a[i])
    if z==a:
        return True
    else: return False
s=[i for i in input()]
n=len(s)
if ispal(s):
    if ispal(s[:(n-1)//2]):
        if ispal(s[(n+3)//2-1:]):
            print('Yes')
            exit(0)
print('No')

Solution (Python):
def check_palindrome(check_string):
  return check_string == check_string[::-1]
instring = input()
N = len(instring)
first_half = instring[:(N-1)//2]
second_half = instring[(N+3)//2-1:]
if check_palindrome(instring) and check_palindrome(first_half) and check_palindrome(second_half):
  print("Yes")
else:
  print("No")

Solution (Python):
s = list(input())
n = len(s)
s_r = s[::-1]
s_h = s[:(n-1)//2]
s_h_r = s_h[::-1]
s_3 = s[(n+3)//2-1:]
s_3_r = s_3[::-1]

if s==s_r and s_h == s_h_r and s_3 and s_3_r:
  print('Yes')
else:
  print('No')

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

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

a = str[0 : (n - 1) // 2]
b = str[(n + 3) // 2 - 1: n]
if check(str) == False or check(a) == False or check(b) == False: print("No")
else: print("Yes")

Solution (Python):
S = input()

N = len(S)

def is_kaibun(x):
    list_x = list(x)
    reversed_list_x = list(reversed(list(x)))
    res = True if list_x==reversed_list_x else False
    return res

ans = 'No'

if is_kaibun(S):
    tmp = int((N-1)/2)
    if is_kaibun(S[:tmp]):
        tmp = int((N+3)/2)-1
        if is_kaibun(S[tmp:]):
            ans = 'Yes'

print(ans)

Solution (Python):
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter


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


n = stdin.readline().rstrip()
pos1 = int((len(n) - 1) / 2)
pos2 = int((len(n) + 3) / 2-1)
pos3 = (len(n))

a = ispalindrome(n)
b = ispalindrome(n[0:pos1])
c = ispalindrome(n[pos2:pos3])

if a & b & c:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)
s1, s2 = s[:(n-1)//2], 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()
n = len(s)
s1 = s[:n//2] 
s2 = s[n//2 + 1:]

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

Solution (Python):
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
def resolve():
    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')
resolve()

Solution (Python):
S=input()
n=len(S)
flag=0
S1=S[0:(n-1)//2]
S2=S[(n+2)//2:]
if S1==S1[::-1] and S2==S2[::-1] and S==S[::-1]:
    pass
else:
    flag=1
print('Yes' if flag==0 else 'No')

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

if S != S[::-1]:
    result = False

S2 = S[0:int((N-1)/2)]
if S2 != S2[::-1]:
    result = False

S3 = S[int((N+1)/2):]
if S3 != S3[::-1]:
    result = False

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

Solution (Python):
import collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect
import heapq


MOD = 1000000007


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def main():
    S = get_input()

    def is_palindrome(s):
        if len(s) == 1:
            return True
        else:
            first = s[:len(s)//2]
            last = s[len(s)//2 + 1:]
            return s == s[::-1] and first == first[::-1] and last == last[::-1]

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys

s = sys.stdin.readline().rstrip()

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

if flag:
    a = s[0:(len(s)-1)//2]
    b = s[(len(s)+1)//2:]
    for i in range(len(a)//2):
        if a[i] != a[-i-1]:
            flag = False
    for j in range(len(b)//2):
        if b[j] != b[-j-1]:
            flag = False

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

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

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

Solution (Python):

import copy
S = list(input())
N = len(S)
S1 = copy.copy(S)
S2 = S[:(N-1)//2]
S3 = S[(N+3)//2-1:]

reverse_S1 = list(reversed(S1))
reverse_S2 = list(reversed(S2))
reverse_S3 = list(reversed(S3))

ans = 'No'

if (S1 == reverse_S1 and S2 == reverse_S2 and S3 == reverse_S3):
    ans = 'Yes'
print(ans)

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

Solution (Python):
s = input()

n = int(len(s))
s_1 = s[:(n-1)//2]
s_2 = s[((n+3)//2-1):n]
ok,ok_1,ok_2 = False,False,False

if s == s[::-1]:
    ok = True
if s_1 == s_1[::-1]:
    ok_1 = True
if s_2 == s_2[::-1]:
    ok_2 = True
if ok and ok_1 and ok_2:
    print("Yes")
else:
    print("No")

Solution (Python):
def res(s):
    n = len(s)
    s_ = s[0:(n-1)//2]
    s__ = s[(n+3)//2-1:n]
    if s == s[-1::-1]:
        if s_ == s_[-1::-1]:
            if s__ == s__[-1::-1]:
                return 'Yes'
    return 'No'

s = input()
print(res(s))

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
s = input()
n = len(s)

for i in range(n):
    if s[i] == s[n-1-i]:
        continue
    else:
        print("No")
        sys.exit()
ans1 = []

for i in range(n//2):
    ans1.append(s[i])
for i in range(len(ans1)):
    if ans1[i] == ans1[len(ans1)-1-i]:
        continue
    else:
        print("No")
        sys.exit()

ans2 = []
for i in range((n+3)//2-1,n):
    ans2.append(s[i])
for i in range(len(ans2)):
    if ans2[i] == ans2[len(ans2)-1-i]:
        continue
    else:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
def main(s):
    if s != s[-1::-1]:
        print("No")
        return

    n = len(s)

    p1 = s[: (n - 1) // 2]

    if p1 != p1[-1::-1]:
        print("No")
        return

    p2 = s[(n + 2) // 2 :]

    if p2 != p2[-1::-1]:
        print("No")
        return

    print("Yes")


if __name__ == "__main__":
    s = input()
    main(s)

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

s_1 = s[:(n-1)//2]
s_2 = s[((n+3)//2 - 1):]

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()
cen = -(-len(s)//2)-1
ans = 'Yes'
if s != s[::-1]:
    ans = 'No'
mae = s[:cen]
if mae != mae[::-1]:
    ans = 'No'

ato = s[cen+1:]
if ato != ato[::-1]:
    ans = 'No'
print(ans)

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

Solution (Python):
s = input()
n = len(s)
count = 0
if s == s[::-1]:
    count += 1

if s[0:(n-1)//2] == s[0:(n-1)//2][::-1]:
    
    count += 1

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


if count >= 3:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
s = input()
strong = True
for i in range(int(len(s)/2)):
  if s[i] != s[len(s)-1-i]:
    strong = False
p = int((len(s)-1)/2)
for i in range(int(p/2)):
  if s[i] != s[p-1-i]:
    strong = False
if len(s) >= 5:
  q = int((len(s)+3)/2)
  for i in range(len(s)-q):
    if s[q+i-1] != s[len(s)-1-i]:
      strong = False
if strong == True:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
n = len(s)
rev = s[::-1]
hd = (n-1)//2
tl = (n+3)//2
if s==rev:
    s_hd = s[:hd] 
    s_tl = s[tl-1:]
    h_rev = s_hd[::-1]
    t_rev = s_tl[::-1]
    
    
    
    
    if s_hd==h_rev:
        if s_tl==t_rev:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

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

Solution (Python):
S = input()

def kaibunCheck(str):
    s = 0
    e = len(str)-1

    while(s < e):
        if(str[s]!=str[e]):
            return False
        s +=1
        e-=1
    return True


c = kaibunCheck(S) and kaibunCheck(S[0:(len(S)-1)//2])

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

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

s = input()
len_s = len(s)
kaibun = s == s[::-1]
left = s[:(len_s-1)//2] == s[:(len_s-1)//2][::-1]
right = s[(len(s)+3)//2-1:] == s[(len(s)+3)//2-1:][::-1]
log(kaibun, left, right)
print("Yes" if kaibun and left and right else "No")

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

Solution (Python):
S = input()

flag = True

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

for i in range(len(S) // 2):
    if(S[i] != S[-i-1]):
        flag = False
if (flag):
    print("Yes")
else:
    print("No")

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

np = False
for i in range(n//2):
    if s[i] != s[n-1-i]:
        np = True
s2 = s[:n//2]

n = len(s2)
for i in range(n//2):
    if s2[i] != s2[n-1-i]:
        np = True
n = len(s)
s2 = s[(n+3)//2-1:]

n = len(s2)
for i in range(n//2):
    if s2[i] != s2[n-1-i]:
        np = True
if np:
    print("No")
else:
    print("Yes")

Solution (Python):
wf = input()
rwf = wf[::-1]

wl = wf[0:int((len(wf)-1)/2)]
rwl = wl[::-1]

wr = wf[int((len(wf)+3)/2-1):len(wf)]
rwr = wr[::-1]

if wf == rwf and wl == rwl and wr == rwr:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S=input()
n= len(S)
ng = 0
s = 0
e = n
for i in range((e-s)//2):
  if S[s+i] != S[e-i-1]:
    ng = 1
nn = (n-1)//2
for i in range(nn//2):
  if S[i] != S[nn-i-1]:
    ng = 1
nn = (n+3)//2 - 1
for i in range((n-nn)//2):
  if S[nn+i] != S[n-i-1]:
    ng = 1
if ng == 1:
  print("No")
else:
  print("Yes")

Solution (Python):
S = list(input())
ans = 'No'
N = len(S)
if S==S[::-1]:
    if S[0:(N-1)//2] == S[0:(N-1)//2][::-1]:
        if S[(N+3)//2-1:] == S[(N+3)//2-1:][::-1]:
            ans ='Yes'
print(ans)

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

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

    return is_kaibun(s) and is_kaibun(s1) and is_kaibun(s2)


s = input()
ans = 'Yes' if is_strong_kaibun(s) else 'No'
print(ans)

Solution (Python):
from sys import exit

def kaibun(s):
    i = 0
    N = len(s)
    if N % 2 == 1:
        while i < (N - 1) // 2:
            if s[i] != s[N - 1 - i]:
                print("No")
                exit()
            i += 1
    else:
        while i < N // 2:
            if s[i] != s[N - 1 - i]:
                print("No")
                exit()
            i += 1


s = input()
s_1 = s[0: (len(s) - 1) // 2]
s_2 = s[(len(s) + 1) // 2:]
kaibun(s)
kaibun(s_1)
kaibun(s_2)
print("Yes")

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

Solution (Python):

GBN_DEBUG = False
GBN_DEBUG = True
def dprn(s, i):
    if GBN_DEBUG: print(", " + s + " = " + str(i), end = "")
def dprns(s):
    if GBN_DEBUG: print(", " + s, end = "")
def dprni(i):
    if GBN_DEBUG: print(i, end=" ")
def endl(): 
    if GBN_DEBUG: print('')
def puts(s): print(s)



S = input()






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

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

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

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

n_l = len(l)
n_m = len(m)
if all(s[i] == s[-i-1] for i in range(n//2)):
    if all(l[i] == l[-i-1] for i in range(n_l//2)):
        if all(m[i] == m[-i-1] for i in range(n_m//2)):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):

s = list(input())

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

m = (n - 1) // 2

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

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

print(ans)

Solution (Python):
S=input()
a=len(S)
ans=1
if S[0:a//2]!=S[a//2+1:a][::-1]:
  ans=0
b=(a-1)//2
A=S[0:a//2]
B=S[a//2+1:a]
if A!=A[::-1]:
  ans=0
if B!=B[::-1]:
  ans=0
if ans==1:
  print('Yes')
else:
  print('No')

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

def isk(st):
    return st == st[::-1]

print("Yes" if (isk(s) and isk(s1) and isk(s2)) else "No")

Solution (Python):
s = input()
n = len(s)
def palindrome(string):

    if(string == string[::-1]):

        return 0

    else:

        return 1

first = palindrome(s)
if(first == 0):
    second = palindrome(s[0:(n-1)//2])
    if(second == 0):
        third = palindrome(s[((n+3)//2)-1:n])
        if(third == 0):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):
s=input()
n=len(s)
a=[]
for i in range(len(s)):
    a.append(s[i])
b=list(reversed(a))
cn=a[:((n-1)//2)]
c=list(reversed(a[:((n-1)//2)]))
d=list(reversed(a[(n+3)//2-1:]))
dn=a[(n+3)//2-1:]
if a==b and c==cn and d==dn:
    print('Yes')
else:
    print('No')

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

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

n = len(s)
ans = 'Yes'

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

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

print(ans)

Solution (Python):
s = input()
n = len(s)
f1 = True
for i in range(n//2):
    if s[i] != s[n-i-1]:
        f1 = False
f2 = True
for i in range((n-1)//4):
    if s[i] != s[(n-1)//2-1-i]:
        f2 = False
f3 = True
nn = n - (n+3)//2
for i in range(nn//2):
    if s[i] != s[n-i-1]:
        f3 = False
if f1 and f2 and f3:
    print("Yes")
else:
    print("No")

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def check(S):
    T = S[::-1]
    return S == T

S = input()
N = len(S)

S1 = S[:N//2]
S2 = S[N//2+1:]
if check(S) and check(S1) and check(S2):
    Yes()
else:
    No()

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

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

Solution (Python):
s = list(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)

if S != ''.join(list(reversed(S))):
    print('No')
    exit()

M = S[:(N - 1) // 2]
if M != ''.join(list(reversed(M))):
    print('No')
    exit()

M = S[(N + 3) // 2 - 1:]
if M != ''.join(list(reversed(M))):
    print('No')
    exit()

print('Yes')

Solution (Python):
S=input()
pre = (len(S)-1)/2
post = (len(S)+3)/2

if S[0:int(pre)] == S[int(post)-1:]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
p = (len(s) - 1) // 2
t = s[:p]
u = s[p+1:]

res = s == s[::-1] and t == t[::-1] and u == u[::-1]

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

Solution (Python):
S = input()
first = S[:int((len(S)-1)/2)]
second = S[int((len(S)+3)/2-1):]
if first == ''.join(list(reversed(first))) and second == ''.join(list(reversed(second))) and first == ''.join(list(reversed(second))):
    print('Yes')
else:
    print('No')

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

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

ans=1

for i in range(int((n-1)/2)):
    if s[i]==s[int((n-1)/2)-1-i]:
        continue
    else:
        ans=0


for i in range(int((n+3)/2),n):
    if s[i]==s[n-1-i]:
        continue
    else:
        ans=0


for i in range(int((n-1)/2)):
    if s[i]==s[n-1-i]:
        continue
    else:
        ans=0
        break



if ans==1:
    print("Yes")
if ans==0:
    print("No")

Solution (Python):
s = input()
l = len(s)
s1 = s[:l//2]
s2 = s[l//2+1:]
l1 = len(s1)
l2 = len(s2)


ans = "Yes"
for i in range(l//2):
 
    if s[i:i+1] != s[l-1-i:l-i]:
        ans = "No"
"""
for i in range(l//4+1):
    print(s[i:i+1],s[(l-1)//2-1-i:(l-1)//2-i],i,i+1,(l-1)//2-1-i,(l-1)//2-i)
    if s[i:i+1] != s[(l-1)//2-1-i:(l-1)//2-i]:
        ans = "No"
for i in range(l//4+1):
    print(s[(l+3)//2+i-1:(l+3)//2+i],s[l-1-i:l-i],(l+3)//2+i-1,(l+3)//2+i,l-1-i,l-i)
    if s[(l+3)//2+i-1:(l+3)//2+i] != s[l-1-i:l-i]:
        ans = "No"
"""
for i in range(l1//2):
   
    if s1[i:i+1] != s1[l1-1-i:l1-i]:
        ans = "No"
for i in range(l2//2):
 
    if s2[i:i+1] != s2[l1-1-i:l1-i]:
        ans = "No"
print(ans)

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

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

    for i in range(len(s) - 1):
        if s[i] != s[-1 - i]:
            print('No')
            exit()

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

    print('Yes')

if __name__ == "__main__":
    main()

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


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

ans = "No"
if S == S[::-1] and a == a[::-1] and b == b[::-1]:
    ans = "Yes"

print(ans)

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

Solution (Python):
def isPalind(s):
  return s == s[::-1]
  
if __name__ == "__main__":
  S = input()
  N = len(S)
  if isPalind(S) and isPalind(S[:(N - 1) // 2]) and isPalind(S[(N + 1) // 2:]):
    print('Yes')
  else:
    print('No')

Solution (Python):
S = input()


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


N = len(S)

if not kaibun(S):
    print('No')
    exit()
    
if not kaibun(S[:(N-1)//2]):
    print('No')
    exit()

if not kaibun(S[(N+3)//2 - 1:]):
    print('No')
    exit()

print('Yes')

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians

from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    S = INPUT()
    N = len(S)

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

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

    print("Yes")
            

if __name__ == '__main__':
    main()

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

for i in range(N // 2):
    if S[i] != S[-i - 1]:
        print("No")
        quit()

S2 = S[: (N - 1) // 2]
N2 = len(S2)
for i in range(N2 // 2):
    if S2[i] != S2[-i - 1]:
        print("No")
        quit()

S3 = S[(N + 3) // 2 - 1:]
N3 = len(S3)
for i in range(N3 // 2):
    if S3[i] != S3[-i - 1]:
        print("No")
        quit()

print("Yes")