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

left = 0
left_end = (len(S)-1)//2 -1
right = len(S)-1
right_start = (len(S)+3)//2 -1
flag = 0

for i in range((len(S)-1)//2):
	if(S[left] != S[right]) or (S[left] != S[left_end]) or (S[right_start] != S[right]):
		flag += 1
		break
	left += 1
	left_end -= 1
	right_start += 1
	right -= 1

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

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

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

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

Solution (Python):
from sys import exit, stdin
S = stdin.readline().rstrip()
N = len(S)
if S == S[::-1] and S[0:(N-1)//2] == S[0:(N-1)//2][::-1] and S[(N+3)//2-1:N] == S[(N+3)//2-1:N][::-1]:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

Solution (Python):
S = input()



def kaibunn_judge(moji):
    if moji==moji[::-1]:
        return 1
    else:
        return 0

n = len(S)
A = S[:(n-1)//2]
B = S[(n+3)//2 - 1:n]

judge = kaibunn_judge(S) + kaibunn_judge(A) + kaibunn_judge(B)

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

Solution (Python):


S = input()
n = len(S)
s1 = S[:(n - 1) // 2]
s2 = S[((n + 3) // 2):-1]

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

Solution (Python):

s = input()
if s != "".join(reversed(list(s))):
    print("No")
    exit()
pre = s[:len(s) // 2]
epi = s[len(s) // 2 + 1:]

if pre == "".join(reversed(pre)) and epi == "".join(reversed(epi)):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

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

def main():
    s = input().strip()
    len_s = len(s)

    ok = True
    for i in range(len_s//2):
        if s[i] != s[len_s-1-i]:
            ok = False
    
    for i in range((len_s//2)//2):
        if s[i] != s[(len_s//2)-1-i]:
            ok = False
    
    if ok:
        print("Yes")
    else:
        print("No")



if __name__ == "__main__":
    main()

Solution (Python):
s = input()

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

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

Solution (Python):
s = input()
ans = "Yes"

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

s1 = s[0:int((len(s) - 1) / 2)]
if s1 != s1[::-1]:
    ans = "No"

print(ans)

Solution (Python):

def is_kaibun(s:str) -> int:
    if len(s)%2 != 0:
        front = s[0:len(s)//2]
        end = s[len(s)//2+1:len(s)]
    else:
        front = s[0:len(s)//2]
        end = s[len(s)//2:len(s)]
    if front == end[::-1]:
        return 1
    else:
        return 0

def main():
    s = input()
    buf1 = s[0:(len(s)-1)//2]
    buf2 = s[(len(s)+3)//2-1:len(s)]
    if is_kaibun(s)  == 1 and is_kaibun(buf1) == 1 and is_kaibun(buf2) == 1:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

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

S = input()
N = len(S)

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

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

S = input()
length = int((len(S)-3)/2)
frag1 = kaibun(S)
test = [0]*int((len(S)-1)/2)
for i in range(length+1):
  test[i] = S[i]
frag2 = kaibun(test)
for i in range(length+1):
  test[i] = S[i+int((len(S)+1)/2)]
frag3 = kaibun(test)
if frag1 == 1 and frag2 == 1 and frag3 == 1:
  print('Yes')
else:
  print('No')

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


List = [i for i in input()]
if (isPalindrome(List)):
    if (isPalindrome(List[:len(List) // 2])):
        if (isPalindrome(List[len(List) // 2 + 1:len(List)])):
            print("Yes")
            exit()
print("No")

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

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

Solution (Python):
s=input()
n=len(s)
t=int((n-1)/2)
a=s[:t]
b=s[int((n+3)/2)-1:]
check=False
if a==b:
    check=True
    if n%4==1:
        r=int((n-1)/4)
    else:
        r=int((n-3)/4)
    for i in range(r):
        if s[i]!=s[t-1-i]:
            check=False
            break
if check:
    print("Yes")
else:
    print("No")

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

else:
  print('No')

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

T1 = S[::-1]
T2 = S[0:(N-1)//2]
T3 = S[(N+3)//2-1:N]

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

Solution (Python):
x = input()
N = len(x)
z = 'No'

x1 = x[:N//2]
x2 = x[N//2+1:]
if x == x[::-1]:
    if x1 == x1[::-1]:
        if x2 == x2[::-1]:
            z = 'Yes'
 
print(z)

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

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

    before = s[0:(len(s)-1)//2]
    after = s[(len(s)+3)//2-1:len(s)]

    print('Yes' if before == after else 'No')

if __name__ == '__main__':
    main()

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

Solution (Python):
s=input();n=len(s)//2;print('YNeos'[any(any(i!=j for i,j in zip(t,t[::-1]))for t in(s,s[:n],s[n+1]))::2])

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

i = 0
j = len(S)-1
ans = 'Yes'
while i <= j:
    if S[i] != S[j-i]:
        ans = 'No'
        break
    i +=1

i = 0
j = len(S)//2-1
while i <= j:
    if S[i] != S[j-i]:
        ans = 'No'
        break
    i +=1

i = len(S)//2+1
j = len(S)-1
while i <= j:
    if S[i] != S[j-i]:
        ans = 'No'
        break
    i +=1

print(ans)

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

if s != r:
  print('No')
  exit()
n = len(s)
s1 = s[:int((n-1)/2)]
r1 = s1[::-1]
if s1 != r1:
  print('No')
  exit()
s2 = s[int((n+3)/2)-1:]
r2 = s2[::-1]
if s2 != r2:
  print('No')
  exit()
print('Yes')

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

Solution (Python):
def isParindrome(s):
  result = True
  for i in range(len(s)):
    if s[i] != s[-i-1]:
      result = False
  return result

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

r1 = isParindrome(s1)
r2 = isParindrome(s2)
r3 = isParindrome(s3)
print("Yes" if r1 and r2 and r3 else "No")

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

Solution (Python):
def isKaibun(s):
    flag = True
    n = 0
    if len(s)%2 == 0:
        n = len(s)//2
    else:
        n = (len(s)-1)//2
    for i in range(n):
        if s[i:i+1] != s[len(s)-(i+1):len(s)-i]:
            flag = False
            break
    return flag
        
s = input()
f = s[:(len(s)-1)//2]
b = s[(len(s)-1)//2+1:]

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

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

if n == 3:
    if s[0] == s[2]:
        print("Yes")
        exit()
    else:
        print("No")
        exit()


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

print(ans)

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

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

if palindrome(s) and palindrome(s[:(length-1)//2]) and palindrome(s[(length+1)//2:]):
    print('Yes')
else:
    print('No')

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

if S != S[::-1]:
  print("No")
  exit()
if left != left[::-1]:
  print("No")
  exit()
if right != right[::-1]:
  print("No")
  exit()
print("Yes")

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

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

Solution (Python):
S = str(input())
l = []
l2 = []
l3 = []
N = len(S)
A = N - 1
B = N + 2
l_rev = []
l2_rev = []
l3_rev = []
for i in range(N):
    l.append(S[i])

for i in range(A // 2):
    l2.append(S[i])

for i in range((B // 2) , N):
    l3.append(S[i])
l_rev = l[::-1]
l2_rev = l2[::-1]
l3_rev = l3[::-1]
"""
print(l2)
print(l3)
"""
if l == l_rev and l2 == l2_rev and l3 == l3_rev:
    print("Yes")
else:
    print("No")

Solution (Python):
def main(s):
    if not isKaibun(s):
        return "No"
    l = len(s)//2
    if not isKaibun(s[:l]):
        return "No"
    if not isKaibun(s[-l:]):
        return "No"
    return "Yes"

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

s = input()
print(main(s))

Solution (Python):
def main():
    S = input()
    ans = "Yes"
    N = len(S)
    tmp1 = S[: (N - 1) // 2]
    tmp2 = S[(N + 3) // 2 - 1 :]
    if S != S[::-1]:
        ans = "No"
    elif tmp1 != tmp1[::-1]:
        ans = "No"
    elif tmp2 != tmp2[::-1]:
        ans = "No"
    print(ans)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
s = input()

def check(strings):
    n = len(s)
    if s[::-1] != s:
        return False
    s2 = s[:(n-1)//2]
    if s2[::-1] != s2:
        return False
    s3 = s[(n+3)//2 - 1:]
    if s3[::-1] != s3:
        return False

    return True

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

Solution (Python):
s = input()
n = len(s)
ans = 'No'
sulice1 = s[0:(n-1)//2]
sulice2 = s[(n+1)//2:n+1]
if s == s[::-1] and  sulice1 == sulice1[::-1] and sulice2 == sulice2[::-1]:
  ans = 'Yes'
print(ans)

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

Solution (Python):
S=input()
N=len(S)
s1=S[0:((N-1)//2)]
s2=S[(((N+3)//2)-1):N]
n1=len(s1);n2=len(s2)
for i in range(N):
    if(S[i]!=S[N-1-i]):
        print("No")
        exit()
for i in range(n1):
    if(s1[i]!=s1[n1-1-i]):
        print("No")
        exit()
for i in range(n2):
    if(s2[i]!=s2[n2-1-i]):
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
k= ''.join(list(reversed(s)))
l=""
if s!=k:
    print("No")
    exit()
n=int((len(s)-1)/2)
for i in range(n):
    l=l+s[i]
if l!= ''.join(list(reversed(l))):
    print("No")
    exit()
print("Yes")

Solution (Python):
def f(s):
  m = len(s)//2
  flag = True
  for i in range(m):
    flag = flag and s[i]==s[-i-1]
  return flag

s = input()
n = (len(s)-1)//2

s1 = s[:n]
s2 = s[n+1:]

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

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

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

Solution (Python):





s=list(input())
n=len(s)
flag=True
stest=s[::-1]
if s!=stest:
    flag=False
stest=s[0:(n-1)//2]
if stest!=stest[::-1]:
    flag=False
stest=s[(n+3)//2-1:n]
if stest!=stest[::-1]:
    flag=False
if flag:
    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")

'''
def flyer_split(s):
    n=len(s)
    return s[0:(n-1)//2],s[(n+1)//2:n]

S=input()
l=flyer_split(S)
if l[0]!=l[1]:
    print("No")
    exit()
l1=flyer_split(l[0])  
if l1[0]!=l1[1]:
    print("No")
    exit()
l2=flyer_split(l[1])  
if l2[0]!=l2[1]:
    print("No")
    exit()
print("Yes")
'''

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):
import sys
input = sys.stdin.readline

def main():
    S = input().strip()
    n = len(S) // 2
    half = S[:n]

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


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
    
for i in range(a//2):
  if s[i]!=s[(a-1-i)]:
    count+=1

for i in range((n-b+1)//2):
  if s[-(i+1)]!=s[b-1+i]:
    count+=1

if count!=0:
  print('No')
else:
  print('Yes')

Solution (Python):
def judge(s):
  if len(s) % 2 == 0:
    return False
  l, r = 0, len(s) - 1
  while r > l:
    if s[l] != s[r]:
      return False
    l += 1
    r -= 1
  l, r = 0, (len(s) - 1) // 2 - 1
  while r > l:
    if s[l] != s[r]:
      return False
    l += 1
    r -= 1
  l, r = (len(s) + 1) // 2, len(s) - 1
  while r > l:
    if s[l] != s[r]:
      return False
    l += 1
    r -= 1
  return True
 
import sys
input = sys.stdin.readline().rstrip()
print('Yes' if judge(input) else 'No')

Solution (Python):
s = list(map(str, input()))
n = len(s)
res = True
for i in range(n//2):
    if (s[i] != s[n-1-i]):
        res = False
        break
i = 0
while res and i < n//4:
    if (s[i] != s[(n-1)//2-1-i]):
        res = False
        break
    i += 1
print("Yes" if res else "No")

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

for i in range(N):
	if S[i] != S[N-1-i]:
		flag = 0

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

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

Solution (Python):
S=str(input())
N=len(S)
part1 = S[:(N-1)//2]
part2 = S[(N+3)//2-1:N]

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

Solution (Python):
import sys


S=str(input())
n=len(S)

c=int(n/2) 


for j in range(c):
  if S[j]==S[-j-1]:
    continue
  else:
    print("No")
    sys.exit()

for i in range(int(c/2)):
  
  
  
  if S[i]==S[c-1-i] and S[c+1+i]==S[n-1-i]:
    continue
  else:
    print("No")
    sys.exit()

print("Yes")

Solution (Python):
s = input()
n = len(s)
def isPal(n):
    return n == n[::-1]

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

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

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

def circle_judge(S,N):
	circle=True
	if N%2==1:
		ite=(N-1)//2
	elif N%2==0:
		ite=(N+1)//2
	for n in range(ite):
		if S[n]!=S[N-1-n]:
			circle=False
			break
	return circle

def main():
	circle=circle_judge(S,N)
	if circle==True:
		S_h=S[:(N-1)//2]
		circle=circle_judge(S_h,(N-1)//2)
	else:
		pass
	return circle

result=main()
if result==True:
	print('Yes')
elif result==False:
	print('No')

Solution (Python):
def is_pal(inp):
    start, end = 0, len(inp) - 1
    while start < end:
        if inp[start] != inp[end]:
            return False
        start += 1
        end -= 1
    return True

inp = input()
n = len(inp)
ret =  is_pal(inp) and is_pal(inp[:(n-1)//2]) and is_pal(inp[(n+3)//2 - 1:])
print('Yes' if ret else 'No')

Solution (Python):
import sys
S=input()
S_bef=S[0:int((len(S)-1)/2)]
S_aft=S[int((len(S)+3)/2)-1:]
if S==S[::-1]:
  if S_bef==S_bef[::-1]:
    if S_aft==S_aft[::-1]:
      print("Yes")
      sys.exit()
print("No")

Solution (Python):
S = input()
ans = "Yes"
for i in range((len(S)-1)//2):
    if S[i] != S[(len(S)-1)//2-i-1] or S[-(1+i)] != S[-((len(S)-1)//2-i)] or S[i] != S[-(1+i)]:
        ans ="No"
print(ans)

Solution (Python):
def ret_kaibun(Str):
    lens = len(Str)
    
    if lens > 3:
        a = ret_kaibun(S[0:int(lens/2)])
        b = ret_kaibun(S[int((lens+3)/2-1):lens])
        if a == 1 and b == 1:
            return 1
    else:
        if not Str[0] == Str[int((lens+1)/2)]:
            return 0
        return 1
    return 0
def kaibun(S):
    for i in range(int(len(S)/2)):
        if not S[i] == S[len(S)-i-1]:
            return 0
    return 1

if __name__ == '__main__':
    S = input()
    lens = len(S)
    check1 = kaibun(S)
    check2 = kaibun(S[0:int(lens/2)])
    check3 = kaibun(S[int((lens+3)/2-1):lens])
    if check1 == 1 and check2==1 and check3==1:
        print('Yes')
    else:
        print('No')

Solution (Python):


def kaibun(s):
    n = len(s)
    if n%2==0:
        s1 = s[:n//2]
        s2 = s[n//2:]
    else:
        s1 = s[:(n-1)//2]
        s2 = s[((n-1)//2)+1:]
    
    m = len(s1)
    for i in range(m):
        if s1[i]!=s2[m-i-1]:
            return False
    return True
    
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]

b1 = kaibun(S)
b2 = kaibun(S1)
b3 = kaibun(S2)

if b1 and b2 and b3:
    print("Yes")
else:
    print("No")

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

c2 = s[:(n-1)//2]
c3 = s[(n+1)//2:]

flg = True

if s != s[::-1]:
    flg = False
if c2 != c2[::-1]:
    flg = False
if c3 != c3[::-1]:
    flg = False
    
    
print('Yes' if flg else 'No')

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

Solution (Python):
s = input()
cnt = 0
for i in range(len(s)):
  if s[i] == s[-(i + 1)]:
    cnt += 1
if cnt != len(s):
  ans = 'No'
else:
  t = s[:(len(s)-1)//2]
  l = s[(len(s)+1)//2:]
  cnt_t = 0
  cnt_l = 0
  for j in range(len(t)):
    if t[j] == t[-(j+1)]:
      cnt_t += 1
  for k in range(len(l)):
    if l[k] == l[-(k+1)]:
      cnt_l += 1
  if cnt_t == len(t) and cnt_l == len(l):
    ans = 'Yes'
  else:
    ans = 'No'
print(ans)

Solution (Python):
S = input()

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

def judge_2(s):
    n = len(s)
    sub = s[0:int((n-1)/2)]
    return judge_1(sub)

def judge_3(s):
    n = len(s)
    sub = s[int((n+3)/2)-1:n]
    return judge_1(sub)

def judge(s):
    return judge_1(s) and judge_2(s) and judge_3(s)

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

Solution (Python):


def f(a):
 if a==a[::-1]:
  return True
 return False

s=raw_input()
n=len(s)
if f(s) and f(s[:n/2]) and f(s[(n+2)/2:]):
 print 'Yes'
else:
 print 'No'

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

c2 = s[:(n-1)//2]
c3 = s[(n+1)//2:]

flg = True

if s != s[::-1]:
    flg = False
if c2 != c2[::-1]:
    flg = False
if c3 != c3[::-1]:
    flg = False
    
    
print('Yes' if flg else 'No')

Solution (Python):
ss = input()
if ss != ss[::-1]:
    print('No')
    exit(0)

ss_f = ss[:int(len(ss) / 2)]
if ss_f != ss_f[::-1]:
    print('No')
    exit(0)

print('Yes')

Solution (Python):
S=str(input())
import sys
t=0
lista=[]
for i in range(99):
    try:
        lista.append(S[i])
        t=t+1
    except IndexError:
        break
u=t//2
v=u//2+1
p=1
for i in range(v):
    if S[i]==S[u-i-1] and S[u-i-1]==S[u+i+1] and S[u+i+1]==S[t-1-i]:
        p=p*1
    else:
        print ('No')
        sys.exit()
print ('Yes')

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

def isOk(s):
    for s, t in zip(s, s[:: -1]):
        if s != t:
            return False
    return True

for s in [S, S[:(N - 1) // 2], S[(N + 3) // 2 - 1:]]:
    if not isOk(s):
        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):
S = input()
N = len(S)


def is_kaibun(s):
    _s = ''.join(list(reversed(s)))
    return s == _s


subset0 = S[0:(N - 2) // 2 + 1]
subset1 = S[(N + 2) // 2:]

ans = 'Yes' if is_kaibun(S) and is_kaibun(subset0) and is_kaibun(
    subset1) else 'No'
print(ans)

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

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

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

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

Solution (Python):
S = input()
def kaibun(st):
    stre = st[::-1]
    if st == stre:
        return 1
    else:
        return 0

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

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

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

s1_1 = list(s1)
s1_2 = list(reversed(s1_1))

if s1_1 == s1_2 and s1 == s2:
    print('Yes')
else:print('No')

Solution (Python):
s=input()
n=len(s)
for i in range(n):
    if s[i]!=s[n-1-i]:
        print("No")
        exit()
harf=int((n-1)/2)
for i in range(harf):
    if s[i]!=s[harf-1-i]:
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
n=len(s)
for i in range(n):
    if s[i]!=s[n-1-i]:
        print("No")
        exit()
harf=int((n-1)/2)
for i in range(harf):
    if s[i]!=s[harf-1-i]:
        print("No")
        exit()
print("Yes")

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

l_s = S[:int(N//2)]
rev_l_s = l_s[::-1]

r_s = S[int(N//2+1):]
rev_r_s = r_s[::-1]

if (l_s == rev_l_s) & (r_s == rev_r_s) & (r_s == rev_l_s) :
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    S = input()
    N = len(S)
    ans = 'Yes'
    a = S[:(N-1)//2]
    b = S[(N+3)//2 - 1:]
    if S != S[::-1]:
        ans = 'No'
    if a != a[::-1]:
        ans = 'No'
    if b != b[::-1]:
        ans = 'No'
    print(ans)
if __name__ == '__main__':
    main()

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

S1=S[:int((N-1)/2)]
S2=S[int((N+3)/2)-1:]
S1r=[i for i in S1[::-1]]
S2r=[i for i in S2[::-1]]
Sr=[i for i in S[::-1]]
if S1==S1r and S2==S2r and S==Sr:
    print('Yes')
else:
    print('No')

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

Solution (Python):


from sys import stdin, stderr

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

def main():
   S = stdin.readline().strip()

   N = len(S)
   if is_palindrome(S) and is_palindrome(S[:N/2]) and is_palindrome(S[(N+1)/2:]):
      print('Yes')
   else:
      print('No')
   
   return 0

if __name__ == '__main__': main()

Solution (Python):

def main():
    S = input().rstrip()
    N = len(S)
    left, right = S[: (N - 1) // 2], S[(N + 3) // 2 - 1:]
    is_palindrome = S == S[::-1]
    check_left = left == left[::-1]
    check_right = right == right[::-1]
    print("Yes" if is_palindrome and check_left and check_right else "No")


if __name__ == "__main__":
    main()

Solution (Python):
S=input();print("YNeos"[S!=S[::-1]or 1-S.endswith(S[:len(S)//2])::2])

Solution (Python):
import math

def jds(strin):
    js = 0
    newSt = strin[::-1]
    if strin == newSt:
        js +=1
    return js
 
a = input()
jud = 0

leee = len(a)

if leee % 2 == 0:
    b = a[:math.ceil((len(a) - 1) / 2)]
    c = a[math.floor((len(a) + 1) / 2):]
else:
    b = a[:int((len(a) - 1) / 2)]
    c = a[int((len(a) + 2) / 2):]
 
jud += jds(a) + jds(b) + jds(c)
 

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

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

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

S=readline().rstrip()
N=len(S)
if S==S[::-1] and S[:(N-1)//2]==(S[:(N-1)//2])[::-1] and S[N//2+N%2:]==(S[N//2+N%2:][::-1]):
  print("Yes")
else:
  print("No")

Solution (Python):
def is_palindrome(S):
  flag = True
  for i in range(len(S)):
    if S[i] != S[-1*(i+1)]:
      flag = False
      break
  return flag

S = str(input())

ans = "No"

if is_palindrome(S) and is_palindrome(S[:len(S)//2]) and is_palindrome(S[(len(S)+1)//2:]):
  ans = "Yes"


print(ans)

Solution (Python):
s=input();print('YNeos'[s.count(s[:len(s)//2])<2::2])

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

Solution (Python):
s=input();n=len(s)//2;print('YNeos'[s[:n]!=s[-n:]::2])

Solution (Python):
s=input();print('YNeos'[s.count(s[:len(s)//2])<2::2])

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

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

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

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

Solution (Python):
s=input();n=len(s)//2;print('YNeos'[s!=s[::-1]or s[:n]!=s[n-1::-1]::2])

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

f = S[0:N//2]
l = S[(N-1)//2+1:N]
fr = f[::-1]
if f == fr and f == l:
    print("Yes")
else:
    print("No")

Solution (Python):


import collections


def isPalindrome(string):
    return string == string[::-1]


def solve(string):
    n = len(string)

    return isPalindrome(string) and isPalindrome(string[:(n-1)//2]) and isPalindrome(string[(n+3)//2 - 1:])


string = input().strip()
print("Yes" if solve(string) else "No")

Solution (Python):
input_list = input()

str_list = list(input_list)

str_len = len(str_list)

start = ''.join(str_list[0:(str_len - 1) // 2])
end = ''.join((str_list[((str_len + 3) // 2) - 1:]))

if start == end:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7 
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    S = input()
    n = len(S)
    if S != S[::-1]:
        print("No")
        return
    h = n // 2
    pre = S[:h]
    suf = S[h+1:]
    print("Yes" if pre==pre[::-1] and suf==suf[::-1] else "No")
resolve()

Solution (Python):



S = input()


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


def main():
    n = len(S)
    a = S[:(n-1)//2]
    b = S[(n+3)//2 - 1:]

    if judge(S) and judge(a) and judge(b):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()