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)
a = s[:((n-1)//2)]
b = s[((n+3)//2-1):]

ans = 'Yes'

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

for j in range(len(a)//2):
    if a[j] == a[-1*(j+1)]:
        continue
    else:
        ans = 'No'
        break
        
for k in range(len(b)//2):
    if b[k] == b[-1*(k+1)]:
        continue
    else:
        ans = 'No'
        break
        
print(ans)

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


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


if not is_kaibun(s):
    print('No')
elif not is_kaibun(s[:n//2]):
    print('No')
elif not is_kaibun(s[(n+2)//2:]):
    print('No')
else:
    print('Yes')

Solution (Python):
import math
import string


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


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


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

s = input()
n = len(s)
a = []
for i in range(int((n-1)/2)):
    a.append(s[i])
b = []
for i in range(int(((n+3)/2)-1), len(s)):
    b.append(s[i])
if a == b:
    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 s1!=s2:
    print("No")
    exit()

s3=s1[0:(n-1)//2]
s4=s1[0:(n+1)//2]
if s3!=s4:
    print("No")
    exit()

s5=s2[0:(n-1)//2]
s6=s2[0:(n+1)//2]
if s5!=s6:
    print("No")
    exit()

print("Yes")

Solution (Python):
s = input()
r = 'Yes'
s2 = s[0:((len(s)-1)//2)]
s3 = s[((len(s)+3)//2)-1:len(s)]
if s != s[::-1] or s2 != s2[::-1] or s3 != s3[::-1]:
	r = 'No'
print(r)

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


s = str(input())
n = len(s)
if kaibun(s):
    if kaibun(s[0:round((n - 1) / 2)]):
        if kaibun(s[round((n + 3) / 2) - 1:]):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):


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


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

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

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

Solution (Python):
s = list(input())
l = len(s)
s1 = s[0:int((l+1)/2)-1]

s3 = s[int((l+1)/2):]
if s1 == s3:
    print("Yes")
else:
    print("No")

Solution (Python):

def is_kaibun(s):
    r = list(s)
    r.reverse()
    str_r = "".join(r)
    if s == str_r:
        return True
    else:
        False

str_s = input()
n = len(str_s)
part_str_a = str_s[0:(n-1)//2]
part_str_b = str_s[(n+3)//2-1:n]
result = True


if not is_kaibun(str_s):
    result = False
if not is_kaibun(part_str_a):
    result = False
if not is_kaibun(part_str_b):
    result = False

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

Solution (Python):
S = input()

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

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

if judge(S) and judge(S0) and judge(S1):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

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

Solution (Python):
S = list(input())
cnt = 0
cnt2 = 0
for i in range(len(S)//2):
    if S[i]==S[len(S)-i-1]:
        cnt+=1
if cnt==len(S)//2:
    for j in range(len(S)//4):
        if S[j]==S[len(S)//2-j-1] and S[len(S)-1-j]==S[len(S)//2+j+1]:
            cnt2+=1
if cnt2==len(S)//4:
    print('Yes')
else:
    print('No')

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

sta = input()
N = len(sta)
sta_a = sta[0:(N-1)//2]
sta_b = sta[(N-1)//2+1:]


if ispalindrome(sta) and ispalindrome(sta_a) and ispalindrome(sta_b):
  print("Yes")
else:
  print("No")

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

l_1 = letter[:int((N-1)/2)]
l_2 = letter[int((N+3)/2-1):]

if(letter == letter[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]):
    ans = "Yes"
else:
    ans = "No"



print(ans)

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

s = input().strip()

def cond():
    p1 = ((len(s) - 1)//2)
    p2 = (len(s) + 3)//2 - 1
    t1 = s[:p1]
    t2 = s[p2:]
    return s == ''.join(reversed(s)) and t1 == ''.join(reversed(t1)) and t2 == ''.join(reversed(t2))

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

Solution (Python):
S = input()
N = len(S)
if not S == S[::-1]:
    print('No')
    exit()

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

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

print('Yes')

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

end = (N-1)//2
stt = (N+3)//2

S1 = S[:end]
S2 = S[stt-1:]

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

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

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

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

Solution (Python):
def is_kai(s, r):
  return(s == r)

S = input()
N = len(S)

mae = []
flag = is_kai(S, S[::-1])

be_idx = int((N-1)/2)
af_idx = int((N+3)/2-1)

be = S[:be_idx]
af = S[af_idx:]

if is_kai(S,S[::-1]) and is_kai(be, be[::-1]) and is_kai(af, af[::-1]):
  print('Yes')
else:
  print('No')

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




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

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

tmp = list(S)
tmp.reverse()
reversedS = "".join(tmp)

if S != reversedS:
    print("No")
    sys.exit(0)

T = S[:(len(S)-1)//2]

tmp = list(T)
tmp.reverse()
if T != "".join(tmp):
    print("No")
    sys.exit(0)

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

tmp = list(W)
tmp.reverse()
if W != "".join(tmp):
    print("No")
    sys.exit(0)

print("Yes")

Solution (Python):
n = input()
if n == n[::-1]:
    zenhan = n[0:int(len(n)//2)]
    if zenhan == zenhan[::-1]:
        kouhan = n[int(len(n)//2)+1::]

        if kouhan == kouhan[::-1]:
            print('Yes')
            exit()

print('No')

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

  nagasa = int((length - 1) / 2)
  former = list(s)[:nagasa]
  later = list(s)[-nagasa:]

  if former == later[::-1] and former == former[::-1] and later == later[::-1]:
    print('Yes')
  else:
    print('No')
main()

Solution (Python):

String = str(input())
Mid = len(String) // 2 
StrFormer = String[0:Mid]
StrFormer_inv = StrFormer[::-1]
StrLater = String[:Mid:-1]
StrLater_inv = StrLater[::-1]
if StrFormer == StrFormer_inv and StrLater == StrLater_inv:
    if StrFormer == StrLater:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):




s = input()
l = len(s)
cidx = (l // 2) + 1

kflg = True

for i in range(l):
    if s[i] != s[l-1-i]:
        kflg = False
        break

if kflg == True:
    for x in range(cidx - 2):
        if s[x] != s[cidx-2-x]:
            kflg = False
            break

if kflg == True:
    for y in range(cidx, l):
        if s[y] != s[l-1-(y-cidx)]:
            kflg = False
            break


if kflg == True:
    ans = "Yes"
else:
    ans = "No"


print(ans)

Solution (Python):
def kaibun(s):
    N=len(s)
    f=1
    if N%2 == 0:
        for i in range(int(N/2)):
            if s[i] != s[N -i -1]:
                f=0
    else:
        for i in range(int((N+1)/2)):
            if s[i]!=s[N-1-i]:
                f=0
    return f


s=input()
N=len(s)
c = 1
'''
for i in range(int((N-1)/2)):
    if s[i]!=s[N-1-i]:
        c=0
d = 1
f = (N-1)/2 % 2

if f == 0:
    for i in range(int((N-1)/4)):
        if s[i]!=s[int((N-1)/2)-1-i]:
            d=0
else:
     for i in range(int(((N-1)/2 -1)/2)):
        if s[i]!=s[int(((N-1)/2 -1)/2-i)]:
            d=0

if c*d == 0:
    print("No")
else:
    print("Yes")
'''

if kaibun(s)*kaibun(s[0:int((N-1)/2)]) == 1:
    print("Yes")
else:
    print("No")

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

S = input().rstrip("\r\n")
N = len(S)
ans = "Yes"
for i in range(N):
    if S[i] != S[N-1-i]:
        ans = "No"
        break
for i in range((N-1)//2):
    if S[i] != S[(N-1)//2-1-i]:
        ans = "No"
        break
for i in range((N+3)//2-1, N):
    if S[i] != S[N-1-i]:
        ans = "No"
        break
print(ans)

Solution (Python):
def main():
    S = input()
    length = len(S)
    S1 = S[0:int((length-1)/2)]
    S2 = S[int((length+3)/2-1):length]
    ans = "Yes"
    for i in range(len(S)):
        if S[i] != S[-i-1]:
            ans = "No"
            break
    for i in range(len(S1)):
        if S1[i] != S1[-i-1]:
            ans = "No"
            break
    for i in range(len(S2)):
        if S2[i] != S2[-i-1]:
            ans = "No"
            break
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
s = input()


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


if is_kaibun(s) is True and is_kaibun(s[:len(s) // 2]) is True and is_kaibun(s[len(s) // 2 +1:]):
    print("Yes")
else:
    print("No")

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

Solution (Python):

S = list(input())
N = len(S)

sub1 = S[:(N-1)//2]
sub2 = S[(N+2)//2:]

Sc = S.copy()
sub1c = sub1.copy()
sub2c = sub2.copy()

Sc.reverse()
sub1c.reverse()
sub2c.reverse()





if S==Sc and sub1==sub1c and sub2==sub2c:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
n = len(s)
u = int((n-1)/2)

s01 = s[:u]
s02 = s[-u:]

s1 = s01[:u]
s2 = s01[-u:]
s3 = s02[:u]
s4 = s02[-u:]

ms = 'Yes'
for t1,t2,t3,t4 in zip(s1,s2,s3,s4):
  if not (t1==t2 and t2 == t3 and t3== t4):
    ms = 'No'
    break
    
print(ms)

Solution (Python):


def is_kaibun(s):
    left = 0
    right = len(s)-1
    while left <= right:
        if s[left] != s[right]:
            return False
        left += 1
        right -= 1
    return True

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

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


if __name__ == "__main__":
    solve()

Solution (Python):
def isKaibun(str):
    isKaibun = True
    length = len(str)
    for i in range(length):
        if str[i] != str[length - i - 1]:
            isKaibun = False
            break
    return isKaibun


S = input()

N = len(S)

output = "No"

flag1 = isKaibun(S)
flag2 = isKaibun(S[0 : int(((N-1)/2))])
flag3 = isKaibun(S[int(((N+3)/2)-1): N])

if flag1 and flag2 and flag3:
    output = "Yes"


print(output)

Solution (Python):
s = input()

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

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


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


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

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

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

a1=int((n-1)/2)
a2=int((n+3)/2-1)

s1=s[0:a1]
s2=s[a2:n]

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

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

ans = "No"
if S == S[::-1] and S_1 == S_1[::-1] and S_2 == S_2[::-1]:
    ans = "Yes"

print(ans)

Solution (Python):
inp = input()

N = len(inp)

s1 = inp[0:(N-1)//2]
s2 = inp[(N+1)//2:N]

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

Solution (Python):
import math

S = input()
N = len(S) 

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

def is_kaibun(string):
  kaibun = True
  if len(string)%2==0:
    
    for i in range(int(len(string)/2)):
      kaibun = kaibun and string[i]==string[-(i+1)]
  else:
    
    for i in range(int((len(string)-1)/2)):
      kaibun = kaibun and string[i]==string[-(i+1)]
  return kaibun

answer = is_kaibun(S) and is_kaibun(subS1) and is_kaibun(subS2)

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

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

Solution (Python):
s = raw_input()
l =[]
l.append( s == s[::-1])
tn = (len(s)-1)/2
l.append(s[:tn] == s[:tn][::-1])
nn = (len(s)+3)/2
l.append(s[nn-1:] == s[nn-1:][::-1])
print "No" if False in l else "Yes"

Solution (Python):

 
s = input()
n = len(s)
f = 1

ss = s[:(n-1)//2]
for i in range((n-1)//4):
    if not ss[i] == ss[-1*(i+1)]:
        f = 0
        break

tt = s[(n+3)//2-1:]
for i in range((n-1)//4):
    if not tt[i] == tt[-1*(i+1)]:
        f = 0
        break

if ss != tt:
    f = 0

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

Solution (Python):
s=input()
ls =len(s)
for i in range(ls//2):
    if s[i]!=s[ls-1-i]:
        print("No")
        exit(0)
s1=s[0:(ls-1)//2]
ls1=len(s1)
for i in range(ls1//2):
    if s1[i]!=s1[ls1-1-i]:
        print("No")
        exit(0)
s2=s[(ls+1)//2:]
ls2=len(s2)
for i in range(ls2//2):
    if s2[i]!=s2[ls2-1-i]:
        print("No")
        exit(0)
print("Yes")

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

Solution (Python):
def IsPalindrome(S):
	l = len(S)
	for i in range(l >> 1):
		if S[i] != S[-(i + 1)]:
			return False
	return True

S = input()

m = len(S) >> 1
L, R = [""] * (m), [""] * (m)
for i in range(m):
	L[i] = S[i]
	R[i] = S[i + m + 1]

if not (IsPalindrome(L) and IsPalindrome(S) and IsPalindrome(R)):
	print("No")
else:
	print("Yes")

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

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

    n = len(s)

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

if __name__ == '__main__':
    main()

Solution (Python):
S = input()

s0 = S[:len(S)//2]
s1 = S[len(S)//2+1:]

def f(s):
    n = len(s)
    halfn = n//2
    result = True
    for i in range(halfn):
        if s[i] != s[-(i+1)]:
            result = False

    return result

ans = 'Yes'
if not f(S):
    ans = 'No'
elif not f(s0):
    ans = 'No'
elif not f(s1):
    ans = 'No'
print(ans)

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def isParindrom(l):
    invers = l[::-1]
    if l == invers:
        return True
    return False

def solve(S: str):
    N = len(S)
    if N % 2 == 0:
        print(NO)
        return

    if not isParindrom(S):
        print(NO)
        return 
    
    num = (N - 1) // 2
    p = S[:num]

    if not isParindrom(p):
        print(NO)
        return
    
    num = (N + 3) // 2 - 1
    r = S[num:]

    if not isParindrom(r):
        print(NO)
        return
    
    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):
def isOK(x):
    return x == "".join(reversed(x))


def calculate(S):
    if isOK(S) == False:
        print("No")
        return

    arr = list(S)
    length = len(arr)

    s1 = arr[0:(length-1)//2]

    if isOK("".join(s1)) == False:
        print("No")
        return

    s2 = arr[(length+2)//2:length]

    if isOK("".join(s2)) == False:
        print("No")
        return

    print("Yes")




S = input()

calculate(S)

Solution (Python):
import math
def isPalindrome(string):
    
    flg = True
    rev = string[::-1]
    return (rev == string)

S = input()

res1 = isPalindrome(S)
a = math.floor((len(S)-1)/2)
res2 = isPalindrome(S[:a])
a = math.floor((len(S)+3)/2)
res3 = isPalindrome(S[a-1:])
if (res1 and res2 and res3):
    print("Yes")
else: print("No")

Solution (Python):
S = input()

N = len(S)

kai = True

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

for i in range((N - 1) // 2 // 2):
    
    if S[i] != S[(N - 1) // 2 - i - 1]:
        kai = False

for i in range((N + 3) // 2 // 2):
    
    if S[i + (N + 3) // 2 - 1] != S[N - i - 1]:
        kai = False

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

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

Solution (Python):
s = input()
n = len(s)
s2 = s[:(n-1)//2]
s3 = s[(n+3)//2-1:]
flug = True
for i in range(len(s)//2):
    end = -i - 1
    if s[i] != s[end]:
        flug = False
        break
for i in range(len(s2)//2):
    end = -i - 1
    if s2[i] != s2[end]:
        flug = False
        break
for i in range(len(s3)//2):
    end = -i - 1
    if s3[i] != s3[end]:
        flug = False
        break
if flug: print("Yes")
else: print("No")

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

s=list(input())

if is_palindrome(s) and is_palindrome(s[:(len(s)-1)//2]) and is_palindrome(s[(len(s)+3)//2-1:]):
    r = "Yes"
else:
    r = "No"

print(r)

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

if left == right:
    print('Yes')
else:
    print('No')

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

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

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

N1 = int((N-1)/2)

if N1%2 ==1:
    N2 = int((N1-1)/2)
else:
    N2 = int(N1/2)

result = "Yes"

for i in range(N2):
    if S[i] != S[N1-1-i]:
        result = "No"
        break

if result == "Yes":
    for i in range(N1):
        if S[i] != S[N-1-i]:
            result ="No"
            break
        

print(result)

Solution (Python):
S = input()


def main():
    l = len(S)
    for i in range(int((l - 1) / 2)):
        
        if S[i] != S[l - i - 1]:
            return False
    S2 = S[:int((l - 1) / 2)]
    
    for i in range(int((len(S2) - 1) / 2) + 1):
        
        if S2[i] != S2[len(S2) - i - 1]:
            return False
    S3 = S[int((l + 3) / 2) - 1:]
    
    for i in range(int((len(S3) - 1) / 2) + 1):
        
        if S3[i] != S3[len(S3) - i - 1]:
            return False
    return True


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

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

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

    n = len(s)
    t_s = s[:(n-1)//2]
    if t_s != t_s[::-1]:
        print("No")
        return 0
    x_s = s[(n+3)//2-1:n]

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

    print("Yes")
    return 0


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
S2 = S[:(len(S) - 1) // 2]
S3 = S[(len(S) + 3) // 2 -1:]
is_ng = False
for i in range(len(S)):
    if S[i] != S[-i - 1]:
        is_ng = True
for i in range(len(S2)):
    if S2[i] != S2[-i - 1]:
        is_ng = True
for i in range(len(S3)):
    if S3[i] != S3[-i - 1]:
        is_ng = True
print('YNeos'[is_ng::2])

Solution (Python):
def kaibun(s, start, goal):
    s_hani = s[start:goal]
    
    if s_hani == ''.join(list(reversed(s_hani))):
        return True
    else:
        return False

if __name__ == '__main__':
    s = input()
    n = len(s)

    
    
    if kaibun(s, 0, n) and kaibun(s, 0, (n - 1) // 2) and kaibun(s, ((n + 3) // 2) - 1, n):
        print("Yes")
    else:
        print("No")

Solution (Python):
def isStrong(S):
    N = len(S)
    if S == S[::-1]:
        left = S[:(N-1)//2]
        right = S[(N+3)//2-1:]
        if left == left[::-1] and right == right[::-1]:
            return True
        else:
            return False
    else:
        return False
        
S = input()
print("Yes") if isStrong(S) else print("No")

Solution (Python):
s=list(map(str, input()))
s_=s.copy()
s.reverse()
a=s_[:int((len(s_)-1)/2)]
a_=a.copy()
a.reverse()
b=s_[int((len(s_)+3)/2)-1:]
b_=b.copy()
b.reverse()
if s_==s and a_==a and b_==b:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
def main():

    S = input()
    S_1 = S[:int((len(S)-1)/2)]
    S_2 = S[int((len(S)+3)/2)-1:]

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

    

if __name__ == '__main__':
    main()

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

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



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


if palindrome(S) and palindrome(A) and palindrome(B):
    print('Yes')
else:
    print('No')

Solution (Python):
s = str(input())
t = s[::-1]
if(s != t):
    print("No")
    exit()
c = ""
for i in range((len(s)-1)//2):
    c += s[i]
e = c[::-1]
if(e != c):
    print("No")
    exit()
r = ""
for i in range(((len(s)+3)//2)-1,len(s),1):
    r += s[i]
y = r[::-1]
if(r != y):
    print("No")
    exit()
print("Yes")
"""
print(s,t)
print(e,c)
print(r,y)
"""

Solution (Python):

def iskaibun(S: str):
    
    return all(x==y for x, y in zip(S, reversed(S)))


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


if __name__ == '__main__':
    main()

Solution (Python):
S = list(input())
L = len(S)
B = int((L-1)/2)
C = int((L+3)/2)

flg = 0
for i in range(L):
    if i < B:
        if S[i] != S[B - 1 - i]:
            flg = 1
        if S[L - 1 - i] != S[C - 1 + i]:
            flg = 1

    if S[i] != S[L - 1 -i]:
        flg = 1

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

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

for i in range(N):
    if S[i] != S[N-i-1]:
        f = False
        break

N2 = (N-1)//2
for i in range(N2):
    if S[i] != S[N2-i-1]:
        f = False
        break

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

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

def main():
    S = input()
    N = len(S)
    n = N // 2

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


    return 0


if __name__ == '__main__':
    main()

Solution (Python):
s=input()
n=len(s)
p=n//2
q=(n+1)//2
kk=s[q:]

if s[0:p]==s[:p:-1] and kk==kk[::-1] :
    print("Yes")
else:
    print("No")

Solution (Python):
def check(string):
    reversed_string = list(reversed(string))
    if list(string) == reversed_string:
        return True
    else:
        return False

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

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

    if check(S) and check(part1) and check(part2):
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
N = len(S)
p_S = S[:int((N - 1) / 2)]
n_S = S[int((N + 3) / 2) - 1:]

def kaibun(S):
    N = len(S)
    if N % 2 == 0:
        flag = True
        for i in range(int(N / 2)):
            if S[i] != S[N - i - 1]:
                flag = False
                break
        if flag:
            return True
        else:
            return False
    else:
        flag = True
        for i in range((N // 2) + 1):
            if S[i] != S[N - i - 1]:
                flag = False
                break
        if flag:
            return True
            
if kaibun(S) and kaibun(p_S) and kaibun(n_S):
    print('Yes')
else:
    print('No')

Solution (Python):





def main():
    inp = lambda: [int(x) for x in input().split()]
    s = input()
    n = (len(s)) // 2
    is_paliny = lambda a: a == a[::-1]
    ans = "Yes" if is_paliny(s) and is_paliny(s[:n]) else "No"
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

if s == t and a == b and c == d:
    print("Yes")
else:
    print("No")

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

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

if not check(S):
  print('No')
  exit()
if not check(S[:(len(S)-1)//2]):
  print('No')
  exit()
if not check(S[(len(S)+3)//2-1:]):
  print('No')
  exit()
print('Yes')

Solution (Python):
S = input()

N = len(S)

ng = False
for i in range(N):
  if S[i] != S[-i-1]:
    ng = True
    
for i in range(N//2):
  if S[i] != S[ N // 2 - i - 1]:
    ng = True

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

Solution (Python):
def kaibun(s):
  ans = True
  for i in range(int(len(s) /2)):
    if s[i] != s[-1 * i - 1]:
      ans = False
      break
  return(ans)


inp = input()
N = len(inp)
a = int((N - 1) / 2)
b = int((N + 3) / 2 -1)
inp_a = inp[:a]
inp_b = inp[b:]
if kaibun(inp) and kaibun(inp_a) and kaibun(inp_b):
  print("Yes")
else:
  print("No")

Solution (Python):
def is_reverse(x):
    if x == "".join(reversed(x)):
        return True
    return False


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

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

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

rev_s = s[::-1]
fs = s[0:(n-1)//2]
rev_fs = fs[::-1]
ls = s[(n+3)//2-1:n]
rev_ls = ls[::-1]

if s == rev_s and fs == rev_fs and ls == rev_ls:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
f = 0
for i in range((N-1)//2):
  if S[i] != S[-i-1]:
    f = 1
S_2 = S[:(N-1)//2]
N_2 = len(S_2)
for i in range(N_2//2):
  if S_2[i] != S_2[-i-1]:
    f = 1
if f == 1:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
s = input()

n = len(s)
s_inv = [s[n-1-i] for i in range(n)]
s_inv = "".join(s_inv)

pre = s[:int((n-1)/2)]
pst = s[int((n+3)/2)-1:]

pre_inv = [pre[len(pre)-1-i] for i in range(len(pre))]
pre_inv = "".join(pre_inv)

pst_inv = [pst[len(pst)-1-i] for i in range(len(pst))]
pst_inv = "".join(pst_inv)

if (s == s_inv) * (pre == pre_inv) * (pst == pst_inv) == 1:
  print("Yes")
else:
  print("No")

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