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):
def main():
    S = input()
    N = len(S)

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

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

    print('Yes')

main()

Solution (Python):
def Palindrome(string):
	return string == string[::-1]

def strongPalindrome(string):
	n = len(string)
	if not Palindrome(string):
		return 'No'
	if not Palindrome(string[:(n - 1) // 2]):
		return 'No'
	if not Palindrome(string[(n + 3) // 2 - 1:]):
		return 'No'
	return 'Yes'

string = input()
print(strongPalindrome(string))

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

if f==l:
  print("Yes")
else:
  print("No")

Solution (Python):
def iskaibun(s):
    lens=len(s)
    
    for i in range(lens // 2):
        
        if s[i] != s[lens-1 - i]:
            return False
    
    return True
    
s = input()
lens=len(s)


if iskaibun(s) and iskaibun(s[0: (lens - 1) // 2]) and iskaibun(s[(lens + 2) // 2 : lens]):
    print("Yes")
else:
    print("No")

Solution (Python):

s = list(input())
l = []
r = []

for i in range(int((len(s)-1)/2)):
    l.append(s[i])

for i in range(int((len(s)+1)/2),len(s)):
    r.append(s[i])

lr = l.copy()
lr.reverse()

rr = r.copy()
rr.reverse()

sr = s.copy()
sr.reverse()

if l == lr and r == rr and s == sr:
    print("Yes")
else:
    print("No")

Solution (Python):



import sys

S = input()
N = len(S)

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

if not is_palindrome(S):
    print("No")
    sys.exit()

if not is_palindrome(S[:(N-1)//2]):
    print("No")
    sys.exit()

if not is_palindrome(S[(N+3)//2-1:]):
    print("No")
    sys.exit()

print("Yes")

Solution (Python):
l=list(input())
def kaibun(c):
  d=c[::-1]
  if c == d:
    return 0
  else:
    return 1
a=kaibun(l)
m=l[:int((len(l)-1)/2)]
n=l[int((len(l)+1)/2):]

b=kaibun(m)
c=kaibun(n)

if a+b+c==0:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
BUN = list(S)
N = 0
for a in BUN:
    N += 1
X = N //2
if BUN[0:X] == BUN[X+1:N+1]:
    print("Yes")
else:
    print("No")

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

def check(string):
  for i in range(len(string)):
    if string[i] != string[len(string)-i-1]:
      return False
  return True
  
print("Yes" if all([check(s),check(t),check(u)]) else "No")

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

zenhan = s[:int((n-1)/2)]
kouhan = s[int((n+3)/2)-1:]

def kaibun_check(str):
  l = len(str)
  ls = int(l//2)+1
  for i in range(ls-1):
    if str[i] == str[l-i-1]:
      continue
    else:
      return False
      break
  return True
    
if kaibun_check(s) and kaibun_check(zenhan) and kaibun_check(kouhan):
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
N=len(S)
cnt=0
cnt1=0
cnt2=0
for i in range (N):
    if S[i]==S[N-1-i]:
        cnt+=1

if cnt==N:
    for j in range((N-1)//2):
        if  S[j]==S[(N-1)//2 -1-j]:
            cnt1+=1
    if cnt1==(N-1)//2:
        for k in range((N-1)//2):
            if S[(N+3)//2 -1+k]==S[N-1-k]:
                cnt2+=1
    else:
        print("No")
        exit()
    if cnt2==(N-1)//2:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
def is_kaibun(s: str) -> bool:
    return s == s[::-1]


S = input()
N = len(S)

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

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

Solution (Python):



N = input()
n = len(N)

N1 = N
N2 = N[:int((n-1)/2)]
N3 = N[int(((n+3)/2)-1):]

N1r = ''.join([N1[i] for i in range(len(N1)-1, -1, -1)])
N2r = ''.join([N2[i] for i in range(len(N2)-1, -1, -1)])
N3r = ''.join([N3[i] for i in range(len(N3)-1, -1, -1)])

if N1 == N1r and N2 == N2r and N3 == N3r : 
    print('Yes')
else : 
    print('No')

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

print(ans)

Solution (Python):


S = input()

N = len(S)

f = S[:int((N-1)/2)]
l = S[int((N+1)/2):]


if f==l:
  print("Yes")
else:
  print("No")

Solution (Python):
a = input()

a_r = ''.join(list(reversed(a)))

a1 = a[0:(len(a)//2)]
a1_r = ''.join(list(reversed(a1)))
a2 = a[len(a)//2+1:len(a)]
a2_r = ''.join(list(reversed(a2)))

if a == a_r and a1 == a1_r and a2 == a2_r:
  print('Yes')
else:
  print('No')

Solution (Python):
def main():
    s = input()
    length = len(s)
    count = 0
    s2 = s[:((length-1)//2)]
    s3 = s[((length+3)//2-1):]
    if s == s[::-1]:
        count += 1

    if s2 == s2[::-1]:
        count += 1

    if s3 == s3[::-1]:
        count += 1

    return 'Yes' if count == 3 else 'No'


if __name__ == '__main__':
    print(main())

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

Solution (Python):
def is_palindrome(str):
  i, j = 0, len(str)-1
  while i <= j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  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)

if list(S) == list(reversed(S)):
    if list(S[0:(N-1)//2]) == list(reversed(S[0:(N-1)//2])):
        if list(S[(N+1)//2:N]) == list(reversed(S[(N+1)//2:N])):
            print("Yes")
            exit(0)
print("No")

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

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

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

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

kaibun1 = 0
for i in range(len(Sa)):
    if Sa[i] == Sa[-(i+1)]:
        kaibun1 += 1

kaibun = 0

if kaibun1 == len(Sa):
    kaibun += 1
        
del Sa[((len(Sa)+1)//2)-1:len(Sa)]


kaibun2 = 0
for i in range(len(Sa)):
    if Sa[i] == Sa[-(i+1)]:
        kaibun2 += 1
        
if kaibun2 == len(Sa):
    kaibun += 1

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

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

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

S_all=is_palindrome(S)
S_forward=is_palindrome(S[:(N-1)//2])
S_rear=is_palindrome(S[(N+3)//2-1:])

if (S_all==True  and S_forward==True)  and S_rear==True:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
s=input()
l=s[:(len(s)-1)//2]
r=s[(len(s)+3)//2-1:]
for i in range((len(s)-1)//2):
  if s[i]==s[-i-1] and l[i]==r[i]:
    if i==(len(s)-1)//2-1:
      print("Yes")
      exit()
    continue
  else:
    print("No")
    break

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

n = len(s)
k = int((n+3)/2 - 1)
flag = 0
for i in range(n-1):
    if not s[i] == s[n-1-i]:
        break
else:
    flag += 1

for i in range(int((n-1)/2)):
    if not s[i] == s[int((n-1)/2 - 1 - i)]:
        break
else:
    flag += 1

for k in range (n):
    if not s[k] == s[n-1-k]:
        break
else:
    flag += 1

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

Solution (Python):
s = input()
ans = True
def isP(s):
  return s == s[::-1]
if not isP(s):
  ans = False
if not isP(s[:len(s)//2]):
  ans = False
if ans:
  print("Yes")
else:
  print("No")

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

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

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

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

Solution (Python):


def is_kaibun(s):
    n = len(s)
    flag = True
    for i in range(n//2):
        flag = (flag and s[i] == s[n-i-1])
    return flag
        
s = input()
n = len(s)

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    sb = s[:len(s)//2]
    sa = s[len(s)//2 + 1:]
    for i in range(len(s)):
        if s[i] != s[-i-1]:
            print("No")
            exit()
    for i in range(len(sb)):
        if sb[i] != sb[-i-1] or sa[i] != sa[-i-1]:
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    solve()

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

def check_palindrome(s):
    s_ = s[::-1]
    return s == s_

s_list = [
    S[:],
    S[:int((N - 1) / 2)],
    S[int((N + 3) / 2) - 1:],
]


result = "Yes"
for s in s_list:
    if not check_palindrome(s):
        result = "No"
        break
print(result)

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()
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 = str(input())
f = []
l = []
ans = 'Yes'
for i in range(int((len(S)-1)/2)):
    f.append(S[i])
    l.append(S[-i-1])
for i in range(len(f)):
    if f[i] != l[-i-1]:
        ans = 'No'
print(ans)

Solution (Python):
S = str(input())
f = []
l = []
ans = 'Yes'
for i in range(int((len(S)-1)/2)):
    f.append(S[i])
    l.append(S[-i-1])
for i in range(len(f)):
    if f[i] != l[-i-1]:
        ans = 'No'
print(ans)

Solution (Python):
S = input()
s = S[::-1]
N = len(S)
n = len(S) // 2 

if S == s:
  if S[ : n] == s[n+1: ] and s[ : n] == S[n+1 : ]:
    print("Yes")
    exit()
print("No")

Solution (Python):
S=input()
S_check=[]
S_check2 =[]

for i in range (0,len(S)):
    S_check2.append(S[i])
    
    
for i in range (0,len(S)//2):
    S_check.append(S[i])

S_check.append(S[len(S)//2])

for i in range (0,len(S)//2):
    S_check.append(S[i])
    



if S_check==S_check2:
    print('Yes')
else:
    print('No')

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


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

Solution (Python):
s = input()

ss = s[::-1]
n = len(s)
s1 = s[0:int((n-1)/2)]
ss1 = s1[::-1]
s2 = s[int((n+3)/2-1):n]
ss2 = s2[::-1]

if s==ss and s1==ss1 and s2==ss2:
  print('Yes')
else:
  print('No')

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

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

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

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

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

	return True


if __name__ == '__main__':
	text = input()
	t_len = len(text)
	if kaibun(text) and kaibun(text[0:t_len // 2]):
		print('Yes')
	else:
		print('No')

Solution (Python):
S = input()

count = 0

if len(S) != 3:
    for i in range(len(S)//2):
        if S[i] == S[len(S)-i-1]:
            count += 1
else:
    if S[0] == S[2]:
        count = 1

if count == len(S)//2:
    if S[0:len(S)//2] == S[(len(S)//2)+1:len(S)]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

if s==s[::-1]:
  if s[:(n-1)//2]==s[(n-1)//2-1::-1] and s[(n+3)//2-1:]==s[:(n+3)//2-2:-1]:
    ans="Yes"
print(ans)

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

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

print("Yes" if m == m[::-1] and h == h[::-1] and m == h else "No")

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

    def is_palin(s_):
        return s_ == "".join(list(reversed(s_)))

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


if __name__ == "__main__":
    main()

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

Solution (Python):
def is_palindrome(text):
  mid = len(text) // 2
  
  if len(text) % 2 == 1:
    if text[:mid] == text[mid+1:][-1::-1]:
      return True
    else:
      return False
  
  else:
    if text[:mid] == text[mid:][-1::-1]:
      return True
    else:
      return False

s = input()

mid = len(s) // 2

front = s[:mid]       
back  = s[mid+1:]     
if is_palindrome(s) and is_palindrome(front) and is_palindrome(back):
  print("Yes")
else:
  print("No")

Solution (Python):
s=input()
n=len(s)
print("Yes" 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] else "No")

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

string = input()

is_string_palindrome = 'No'
left_substring = string[0:len(string)//2]
right_substring = string[(len(string)//2) + 1:]
if is_palindrome(string) and is_palindrome(left_substring) and is_palindrome(right_substring):
    is_string_palindrome = 'Yes'

print(is_string_palindrome)

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

s_1=[]
s_2=[]

for i in range(0,int(len(S)/2)):
    s_1.append(S[i])

for i in range(int(len(S)/2)+1,len(S)):
    s_2.append(S[i])


def kaibun(s):
    s=list(s)
    n=len(s)
    if n%2==0:
        for i in range(int(n/2)):
            if s[i]!=s[n-1-i]:
                return None
    else:
        for i in range(int(n/2)):
            if s[i] != s[n -1- i]:
                return None
    return True

if kaibun(S) and kaibun(s_1) and kaibun(s_2):
    print("Yes")
else:
    print("No")

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

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

print("Yes" if all([check(s),check(t),check(u)]) else "No")

Solution (Python):

import math
character = input()
re_character = character[::-1]
 
num = int(len(character))
middle = math.ceil(num/2.0)





if (character[middle:num] == re_character[0:middle-1]):
  if (character[0:num] == re_character[0:num]):
    print("Yes")
  else:
    print("No")
else:
  print("No")

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

Solution (Python):
S = input()

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

if is_palindrome(S) \
and is_palindrome(S[:len(S)//2]):
  print('Yes')
else:
  print('No')

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

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

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

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

result = (S == ''.join(list(reversed(S))) and
S[0:int((N-1)/2)] == ''.join(list(reversed(S[0:int((N-1)/2)]))) and
S[int((N+3)/2):-1] == ''.join(list(reversed(S[int((N+3)/2):-1]))))

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

Solution (Python):

s = input()
s1 = s[:len(s)//2]
s2 = s[len(s)//2+1:]

s1_ = list(reversed(s1))
s2_ = list(reversed(s2))

if(s1==s2 and list(s1)==s1_ and list(s2)==s2_):
  	print('Yes')
else:
  	print('No')

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

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

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

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

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

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

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

Solution (Python):
s=list(input())
N=len(s)
a=s[0:(N-1)//2]
b=s[(N+3)//2 -1:N]

S=list(reversed(s))
A=list(reversed(a))
B=list(reversed(b))


if s==S and a==A and b==B:
    print("Yes")
    exit()

print("No")

Solution (Python):
s=input()
n=len(s)
print('Yes' 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] else 'No')

Solution (Python):
s = input()

length = len(s)

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

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

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

N=len(S)

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

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

Solution (Python):
s = list(input())
n = len(s)
one=(n-1)//2
two=(n+3)//2
s_1 = s[:one]
s_2 = s[two-1:]
if s_1 == list(reversed(s_1)):
    if s_2 == list(reversed(s_2)):
        if s == list(reversed(s)):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Solution (Python):

"""
Created on Thu Mar 19 11:55:12 2020

@author: 17664
"""
kaibun = input()
joken1 = kaibun[:(len(kaibun)-1)//2]

joken2 = kaibun[(len(kaibun)+2)//2:]


ans = 'No'

if kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:
    ans = 'Yes'
    
print(ans)

Solution (Python):

s = input()
ans = True
def isP(s):
  return s == s[::-1]
if not isP(s):
  ans = False
if not isP(s[:len(s)//2]):
  ans = False
if ans:
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(input())
N = len(S)
f = S[:(N-1)//2]
r = S[(N+1)//2:]

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

Solution (Python):
S = input()
message = "No"
if S == S[::-1]:
	index = (len(S)-1)//2
	test = S[:index]
	if test == test[::-1]:
		index2 = (len(S)+3)//2
		otest = S[index2-1:]
		if otest == otest[::-1]:
			message = "Yes"
print(message)

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

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

s = input()
n = len(s)
former = (n-1)//2
latter = (n+3)//2-1
t = s[:former]
u = s[latter:]

if isPalindrome(s) and isPalindrome(t) and isPalindrome(u):
  print("Yes")
else:
  print("No")

Solution (Python):
def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

s=s0()

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

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

front = s[:(n-1)//2]
rear = s[(n+1)//2:]

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def kaibun(s):
    flg=1
    if len(s)==1:
        pass
    else:
        for i in range(len(s)//2):
            if s[i]==s[len(s)-i-1]:
                pass
            else:
                flg=0
    return flg
    
def do():
    s=STR()
    n=len(s)
    s1=s[0:n//2]
    s2=s[n//2+1:n]
    flg=kaibun(s1)*kaibun(s2)*kaibun(s)
    if flg==1:
        print('Yes')
    else:
        print('No')
    
    
if __name__ == '__main__':
    do()

Solution (Python):


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


s = input()
l = len(s)
if isPalindrome(s) and isPalindrome(s[:l // 2]) and isPalindrome(s[l // 2 + 1:]):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input().strip('\n')
S1=S[:(len(S)-1)//2]
S2=S[(len(S)-1)//2+1:]
flag=True
for i in range(len(S)//2):
    if S[i]!=S[-i-1]:
        flag=False               
for i in range(len(S)//2//2):
    if S1[i]!=S1[-i-1] or S2[i]!=S2[-i-1]:
        flag=False
print('Yes' if flag else 'No')

Solution (Python):
S=list(map(str,input()))
if S[0]==S[int((len(S)-1)/2-1)] and S[:int((len(S)-1)/2)]==S[int((len(S)+1)/2):]:
    print("Yes")
else:
    print("No")

Solution (Python):


'''
akasaka

'''

import sys

S = input()

for i in range(len(S)):
    
    if not S[i] == S[len(S)-1 - i]:
        print('No')
        sys.exit()


newS = list(S)[:int((len(S)-1)/2)]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

newS = list(S)[int((len(S)+3)/2 - 1):]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

print('Yes')

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

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

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

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

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

Solution (Python):
s = input()

def palindrome(s):
    l = len(s)
    reverse_half_s_left = s[:l//2]
    reverse_half_s_right = s[(l//2)+1:]
    if reverse_half_s_left != reverse_half_s_right[::-1]: return False
    if reverse_half_s_left != reverse_half_s_right: return False
    return True

print ('Yes' if (palindrome(s)) else 'No')

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

check = 0
for i in range(int((N+1)/2)):
    if S[i] != S[N-1-i]:
        check +=1
    else:
        check +=0


S_1 = S[0:int((N-1)/2)]
N_1 = len(S_1)
check_1 = 0

for i in range(int((N_1+1)/2)):
    if S_1[i] != S_1[N_1-1-i]:
        check_1 +=1
    else:
        check_1 +=0

        
S_2 = S[int((N+1)/2):N]
N_2 = len(S_2)
check_2 = 0

for i in range(int((N_2+1)/2)):
    if S_2[i] != S_2[N_2-1-i]:
        check_2 +=1
    else:
        check_2 +=0

if check + check_1 + check_2 ==0:
    print('Yes')
else:
    print('No')

Solution (Python):
a = str(input())
b = a[0:int((len(a)-1)/2)]
c = a[int((len(a)+1)/2):int(len(a))]
c = c[::-1]

if b != c:
	print('No')
elif b != b[::-1]:
	print('No')
elif c != c[::-1]:
	print('No')
else:
	print('Yes')

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

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()
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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    def f(t):
        l = len(t)
        for i in range(l//2):
            if t[i] != t[-1 - i]:
                return False
        return True
    l = len(s)
    if f(s) and f(s[:l//2]) and f(s[l//2+1:]):
        return "Yes"

    return "No"


print(main())

Solution (Python):
a = input()
rev_a = ''.join(list(reversed(a)))



length = len(a)

if a == rev_a:
    a1 = a[0:length//2]
    rev_a1 = ''.join(list(reversed(a1)))
    
    a2 = a[length//2+1:length]
    rev_a2 = ''.join(list(reversed(a2)))
    
    if a1 == rev_a1 and a2 == rev_a2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
def check(l):
  n=len(l)
  ret="Yes"
  for i in range(int(n/2)):
    if l[i]!=l[n-1-i]:
      ret="No"
      break
  return ret

S=list(map(str,input()))
N=len(S)
S1=[]
S2=[]
for i in range(N):
  if i<=int((N-1)/2)-1:
    S1.append(S[i])
  if i>=int((N+3)/2)-1:
    S2.append(S[i])

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

Solution (Python):
s = input(); 
n = len(s);
ss = "";
sss = "";
ssss = "";

for i in range(1,n+1):
  ss = ss + s[n-i];

mid = int((n+1)/2);

for i in range(mid-1):
  sss = sss + s[mid-2-i]
  
for i in range(mid-1):
  ssss = ssss + s[n - i -1];
  
if ss ==s and sss == s[0:mid-1] and ssss == s[mid:n]:
  print("Yes");
else:
  print("No")

Solution (Python):
S = input()

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

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

Solution (Python):
s = input()
s1 = s[0 : len(s) // 2]
s2 = s[len(s) // 2  + 1 : len(s)]
c, c1, c2 = 0, 0, 0
flag = 0
for i in range(len(s) // 2):
    if s[i] != s[len(s) - i - 1]:
        break
    else:
        c += 1
if c != len(s) // 2:
    print("No")
    exit()
for i in range(len(s1) // 2):
    if s1[i] != s1[len(s1) - i - 1]:
        break
    else:
        c1 += 1
if c1 != len(s1) // 2:
    print("No")
    exit()
for i in range(len(s2) // 2):       
    if s2[i] != s2[len(s2) - i - 1]:
        break
    else:
        c2 += 1
if c2 != len(s2) // 2:
    print("No")
    exit()
print("Yes")

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

s_ok = True  
for i in range(n):
  if s[i] != s[-1 - i]:
    s_ok = False

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

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

if s_ok and s_left_ok and s_right_ok:
  print('Yes')
else:
  print('No')

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

if s==S:
    t = s[0:int((len(s)-1)/2)]
    T = t[::-1]
    
    if t ==T:
        p = s[int((len(s)+3)/2)-1:]
        P = p[::-1]
        
        if p == P:
            print("Yes")
            quit()

print("No")

Solution (Python):
s=input()
str1=""
str2=""

for j in range(int((len(s)-1)/2)):
  str1+=s[j]
  str2+=s[j+int((len(s)-1)/2+1)]
    
print("Yes" if str1==str2 else "No")

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  s = input()
  slen = len(s)
  
  L_s = s[:((slen-1)//2)]
  R_s = s[((slen+3)//2)-1:]
  
  if s == s[::-1]:
    if L_s == L_s[::-1]:
      if R_s == R_s[::-1]:
        print('Yes')
        exit()
  
  print('No')
  
if __name__ == '__main__':
  main()

Solution (Python):

"""
Created on Sat Apr  4 19:25:17 2020

@author: Kanaru Sato
"""

def parin(s):
    l = list(s)
    flag = 0
    for i in range(len(l)//2):
        if l[i] != l[len(s)-i-1]:
            flag = 1
    if flag == 0:
        return True
    else:
        return False


s = list(input())

if parin(s) == True:
    if parin(s[0:len(s)//2]) == True and parin(s[len(s)//2+1:len(s)]) == True:
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

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