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



Sample input:
akasaka


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
S = input()
first = S[0:int((len(S) - 1) / 2)]
second= S[-1 * int((len(S) - 1) / 2):]

if first == first[::-1] and second == second[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
first = S[0:int(len(S) / 2)]
second= S[-1 * int(len(S) / 2):]

if first == first[::-1] and second == second[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

N=len(S)

S_left=[S[i] for i in range((N-1)//2)]
S_right=[S[i] for i in range((N+2)//2,N)]

def kaibun(X):
    count=0
    for i in range(len(X)//2):
        if S[i]==S[len(X)-1-i]:
            count+=1
    if count==len(X)//2:
        return 1
    else:
        return 0
        
print("Yes" if kaibun(S_left)*kaibun(S_right)==1 else "No")

Submission status: Wrong Answer

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

N=len(S)

S_left=[S[i] for i in range((N-1)//2)]
S_right=[S[i] for i in range((N+2)//2,N)]

def kaibun(X):
    count=0
    for i in range(len(X)//2):
        if S[i]==S[len(X)-1-i]:
            count+=1
    if count==len(X)//2:
        return 1
    else:
        return 0
        
print("Yes" if kaibun(S_left)*kaibun(S_right) else "No")

Submission status: Wrong Answer

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

N=S[0:int((n-1)/2)]
M=S[int((n-1)/2+1):n]

def pal(l):
    k=len(l)
    ok=0
    for i in range(len(l)):
        if l[i]==l[k-1-i]:
            ok+=1
    if ok==k:
        return 'y'
    else:
        return 'n'

if pal(N)=='y' and pal(M)=='y':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def kaibun(S):
    lenS = len(S)
#    print()
#    print(S)
#    print(S[:lenS//2])
#    print(S[:(lenS-1)//2:-1])
    if S[:lenS//2] == S[:(lenS-1)//2:-1]:
        return 1
    else:
        return 0
S = input()
lenS = len(S)
if  kaibun(S[:lenS//2]) and kaibun(S[lenS//2+1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
S = input()
for t in range(len(S) // 2):
    if not S[t] == S[-(t+1)]:
        print("No")
        sys.exit()
print("Yes")

Submission status: Wrong Answer

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

a=False

for i in range(N):
    if S[i]!=S[N-1-i]:
        print("No")
        break
    else:
        a=True

if a==True:
    for j in range(int((N-3)/2)+1):
        if S[j]!=S[int((N-3)/2)-j]:
            a=False
            print("No")
            break
if a==True:
    for k in range(int((N-3)/2)+1):
        if S[int((N+1)/2)+k]!=S[N-1-k]:
            a=False
            print("No")
            break
if a==True:
    print("Yes")

Submission status: Wrong Answer

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

a=False

for i in range(N):
    if S[i]!=S[N-1-i]:
        print("No")
        break
    else:
        a=True

if a==True:
    for j in range(int((N-3)/2)):
        if S[j]!=S[int((N-3)/2)-j]:
            a=False
            print("No")
            break
if a==True:
    for k in range(int((N-3)/2)):
        if S[int((N+1)/2)+k]!=S[N-1-k]:
            a=False
            print("No")
            break
if a==True:
    print("Yes")

Submission status: Wrong Answer

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

a=False

for i in range(N):
    if S[i]!=S[N-1-i]:
        print("No")
        break
    else:
        a=True

if a==True:
    for j in range(int((N-3)/2)):
        if S[j]!=S[int((N-3)/2)-j]:
            a=False
            print("No")
            break
if a==True:
    for k in range(int((N-3)/2)):
        if S[int((N+1)/2)+k]!=S[N-1-k]:
            a=False
            print("No")
            break
if a==True:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def isKaibun(text):
    n=len(text)
    if text[:n//2]==text[n-1:n//2:-1]:
        return 1
    else:
        return 0

S=input()
n=len(S)
if isKaibun(S):
    if isKaibun(S[:n//2]):
        print("Yes")
    else:
        print("No")        
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
s1 = s[:(l-1)//2]
s2 = s[(l+3)//2-1:]

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

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
s1 = s[:l//2]
s2 = s[3*l//2:]

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

Submission status: Wrong Answer

Solution code:
s = str(input())

def kaibun(mojiretsu):
    n = len(mojiretsu)
    kaibuns = True
    if (n-1)%2 == 0:
        if n >= 3:
            for i in range(0,(n-1)//2):
                if not mojiretsu[i] == mojiretsu[-i-1]:
                    kaibuns = False
                    break
        else:
            kaibuns = False
    else:
        for i in range(0,n//2):
            if not mojiretsu[i] == mojiretsu[-i-1]:
                kaibuns = False
                break

    if kaibuns:
        return True
    else:
        return False
    

kaibun1 = kaibun(s)

if kaibun1:
    N = len(s)
    s2, s3 = s[0:(N-1)//2], s[(N+3)//2-1:N+1]
    kaibun2 = kaibun(s2)
    kaibun3 = kaibun(s3)
    if kaibun2 and kaibun3:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())

def kaibun(mojiretsu):
    n = len(mojiretsu)
    kaibuns = True
    if (n-1)%2 == 0:
        if n >= 3:
            for i in range(0,(n-1)//2):
                if not mojiretsu[i] == mojiretsu[-i-1]:
                    kaibuns = False
                    break
        else:
            kaibuns = False
    else:
        for i in range(0,n-1):
            if not mojiretsu[i] == mojiretsu[i+1]:
                kaibuns = False
                break

    if kaibuns:
        return True
    else:
        return False
    

kaibun1 = kaibun(s)

if kaibun1:
    N = len(s)
    s2, s3 = s[0:(N-1)//2], s[(N+3)//2-1:N+1]
    kaibun2 = kaibun(s2)
    kaibun3 = kaibun(s3)
    if kaibun2 and kaibun3:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())

def kaibun(mojiretsu):
    n = len(mojiretsu)
    kaibuns = True
    if (n-1)%2 == 0:
        for i in range(0,(n-1)//2):
            if not mojiretsu[i] == mojiretsu[-i-1]:
                kaibuns = False
                break
    else:
        for i in range(0,n-1):
            if not mojiretsu[i] == mojiretsu[i+1]:
                kaibuns = False
    if kaibuns:
        return True
    else:
        return False
    

kaibun1 = kaibun(s)

if kaibun1:
    N = len(s)
    s2, s3 = s[0:(N-1)//2], s[(N+3)//2-1:N+1]
    kaibun2 = kaibun(s2)
    kaibun3 = kaibun(s3)
    if kaibun2 and kaibun3:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

s = readChar()
n = len(s)

def z1(st):
	if len(st)%2==1:
		a = (len(st)-1)//2
		if st[:a]==st[a+1:][::-1]:
			return 1
		else:
			return 0
	else:
		a = len(st)//2
		if st[:a]==st[a:][-1]:
			return 1
		else:
			return 0

def z2(st):
	a = (len(st)-1)//2
	return z1(st[:a])

def z3(st):
	a = (len(st)+3)//2
	return z1(st[a-1:])

def jud(st):
	return z1(st)*z2(st)*z3(st)


if jud(s)==1:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
import math
import queue
from collections import defaultdict
 
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):#階乗
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def printQueue(q):
	r=q
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)

s = readChar()
n = len(s)

def z1(st):
	a = (len(st)-1)//2
	if st[:a]==st[a+1:][::-1]:
		return 1
	else:
		return 0

def z2(st):
	a = (len(st)-1)//2
	return z1(st[:a])

def z3(st):
	a = (len(st)+3)//2
	return z1(st[a-1:])

def jud(st):
	return z1(st)*z2(st)*z3(st)


if jud(s)==1:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
#print(s[:(l-1)//2])
#print(s[(l+3)//2-1:])
def pal(t):
    c = 1
    for i in range((len(t)-1)//2):
        if t[i] != t[-i-1]:
            c = 0
    return c

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

Submission status: Wrong Answer

Solution code:
# B - String Palindrome

S = input()

ans = 'No'

N = len(S)
left1 = S[:(N - 1) // 2]
right1 = S[((N + 3) // 2) - 1:]
if left1 == right1:
    N = len(left1)
    if N % 2 == 0:
        left2 = left1[:(N - 1) // 2 + 1]
    else:
        left2 = left1[:(N - 1) // 2]
    right2 = left1[((N + 3) // 2) - 1:]
    if left2 == right2:
        N = len(right1)
        if N % 2 == 0:
            left3 = right1[:(N - 1) // 2 + 1]
        else:
            left3 = right1[:(N - 1) // 2]
        right3 = right1[((N + 3) // 2) - 1:]
        if left3 == right3:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
# B - String Palindrome

S = input()

ans = 'No'

N = len(S)
left1 = S[:(N - 1) // 2]
right1 = S[((N + 3) // 2) - 1:]
if left1 == right1:
    N = len(left1)
    left2 = left1[:(N - 1) // 2]
    right2 = left1[((N + 3) // 2) - 1:]
    if 1 < N and left2 == right2:
        N = len(right1)
        left3 = right1[:(N - 1) // 2]
        right3 = right1[((N + 3) // 2) - 1:]
        if 1 < N and left3 == right3:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
# B - String Palindrome

S = input()

ans = 'No'

N = len(S)
left1 = S[:(N - 1) // 2]
right1 = S[((N + 3) // 2) - 1:]
if left1 == right1:
    N = len(left1)
    left2 = left1[:(N - 1) // 2]
    right2 = left1[((N + 3) // 2) - 1:]
    if left2 == right2:
        N = len(right1)
        left3 = right1[:(N - 1) // 2]
        right3 = right1[((N + 3) // 2) - 1:]
        if left3 == right3:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
# B - String Palindrome

S = input()

ans = 'No'

N = len(S)
left1 = S[:(N - 1) // 2]
right1 = S[((N - 1) // 2) + 1:]
if left1 == right1:
    N = len(left1)
    left2 = left1[:(N - 1) // 2]
    right2 = left1[((N - 1) // 2) + 1:]
    if left2 == right2:
        N = len(right1)
        left3 = right1[:(N - 1) // 2]
        right3 = right1[((N - 1) // 2) + 1:]
        if left3 == right3:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
s  = input()
n = len(s)
#  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

def is_kaibun(s):
    l = len(s)
    s1 = s[:l//2+1]
    s2 = s[l//2:]

    return (s1 == s2[::-1]), s1, s2

is_kaibun_, s1, s2 = is_kaibun(s)

if is_kaibun_:
    q1 = s[:(n-1)//2]
    is_kaibun1, s1, s2 = is_kaibun(q1)
    #print(q1)
    #print(is_kaibun(q1))
    q2 = s[(n+3)//2-1:]
    is_kaibun2, s1, s2 = is_kaibun(q2)
    #print(q2)
    #print(is_kaibun(q2))
    print('Yes' if is_kaibun1 * is_kaibun2 else 'No')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
l = int((len(S)-1)/2)
a = 0
for i in range(l):
  if S[i] == S[2*l-i] and S[i] == S[l-1-i] and S[i+l+1] == S[2*l-i]:
    a = a + 1
  
if a == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
first=int((n-1)/2)
last=int((n+3)/2-1)
#print(first)
#print(last)
s_first_list=list(s[:first])
s_last_list=list(s[last:])
rev_s_first_list=list(reversed(s_first_list))
rev_s_last_list=list(reversed(s_last_list))

#print(s_first_list)
#print(s_last_list)
#print(rev_s_first_list)
#print(rev_s_last_list)

for i in range(len(s_first_list)):
    if (s_first_list[i]!=rev_s_first_list[i])|(s_last_list[i]!=rev_s_last_list[i]):
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


def main():
    S = input().strip()
    N = len(S)
    for i in range(N):
        if S[i] == S[N-i-1]:
            print("No")
            exit()
    for i in range((N-1)//2):
        if not (S[i] == S[(N-1)//2-i-1] and S[(N+3)//2+i-1] == S[N-i-1]):
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


def main():
    S = input().strip()
    for i in range((len(S)-1)//2):
        if not (S[i] == S[(len(S)-1)//2-i-1] and S[(len(S)+3)//2+i-1] == S[len(S)-i-1]):
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
first =S[len(S)//2+1:]
if S[:len(S)//2] != first[::-1]:
    count +=1

second = S[len(S)//4+1:len(S)//2]
if S[:len(S)//4] != second[::-1]: 
    count +=1

third = S[len(S)//2+len(S)//4+1+1:]
if S[len(S)//2+1:len(S)//2+len(S)//4+1] != third[::-1]: 
    count +=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
first =S[len(S)//2+1:]
if S[:len(S)//2] != first[::-1]:
    count +=1

second = S[len(S)//4+1:len(S)//2]
if S[:len(S)//4] != second[::-1]: 
    count +=1

third = S[len(S)//2+1+len(S)//4+1:]
if S[len(S)//2+1:len(S)//2+len(S)//4+1] != third[::-1]: 
    count +=1

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
s = S[::-1]

if S != s:
    print('No')
    exit()

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

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

print('Yes')

Submission status: Wrong Answer

Solution code:
import sys
S = input()
N = len(S)
s = S[::-1]

if S != s:
    print('No')
    sys.exit()

if (S[:(N-1)//2]) != (s[:((N-1)//2)]):
    print('No')
    sys.exit()

if S[((N+3)//2)-1:] != s[((N+3)//2)-1:]:
    print('No')
    sys.exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
s=list(str(input()))
l=len(s)
t=list(reversed(s))
a=[]
if s==t:
  for i in range(0,int((l-1)/2)):
    if s[i]==s[int((l-1)/2-i)-1]:
      a.append(s[i])
  if len(a)==(l-1)/2:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=list(input())
n=len(S)
ans='No'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):n+1]
        if new2==list(reversed(new2)):
            ans='Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
string=input()
kaibun=list(string)
n=int(len(kaibun))

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

Submission status: Wrong Answer

Solution code:
string=input()
kaibun=list(string)
n=int(len(kaibun))

if (n>=3)and(n<=99)and(n%2==1)and(string.islower()==True):

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

Submission status: Wrong Answer

Solution code:
string=input()
kaibun=list(string)
n=int(len(kaibun))

if (n>=3)and(n<=99)and(n%2==1):

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

Submission status: Wrong Answer

Solution code:
S=input()
s=int(len(S))
p=1
for i in range(int((((s-1)/2)+1)/2)):
    if S[i]==S[int((s-1)/2-(i+1))]:
        p=p*1
    else:
        p=p*0
if int(p)==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
string=input()
kaibun=list(string)
n=int(len(kaibun))



con_kaibuna=list(reversed(kaibun[:int((n-1)/2)]))
con_kaibunb=list(reversed(kaibun[int((n+1)/2):]))


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
Ans='Yes'
        
if S[:int((N-1)/2)]!=S[:int((N-1)/2):-1]:
    Ans='No'
    
if int((N-1)/2)%2==0:
    if S[:int((N+3)/4)]==S[:int((N+3)/4):-1]:
        Ans='No'
        
else:
    if N!=3 and S[:int((N+1)/4)]==S[:int((N+1)/4):-1]:
        Ans='No'
    
print(Ans)

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
Ans='Yes'
        
if S[:int((N-1)/2)]!=S[:int((N-1)/2):-1]:
    Ans='No'
    
if int((N-1)/2)%2==0:
    if S[:int((N+3)/4)]==S[:int((N+3)/4):-1]:
        Ans='No'
        
else:
    if S[:int((N+1)/4)]==S[:int((N+1)/4):-1]:
        Ans='No'
    
print(Ans)

Submission status: Wrong Answer

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



Ans='Yes'
        
if S[:int((N-1)/2)]!=S[:int((N-1)/2):-1]:
    Ans='No'
    
if int((N-1)/2)%2==0:
    if S[:int((N+3)/4)]==S[:int((N+3)/4):-1]:
        Ans='No'
        
else:
    if S[:int((N+1)/4)]==S[:int((N+1)/4):-1]:
        Ans='No'
    
print(Ans)

Submission status: Wrong Answer

Solution code:
S = input()
N = int(len(S))
S_a = S[:(N-1)//2]
S_b = S[(N+3)//2:]
#print(S)
if S == S[::-1] and S_a == S_a[::-1] and S_b == S_b[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def isKaibun(str):
    a = int((len(str) - 1) / 2)
    b = int((len(str) + 3) / 2) - 1
    s1 = str[0:a]
    s2 = str[b:len(s)]
    return s1 == s2
s = input()

if not isKaibun(s):
    print("No")
elif not isKaibun(s[0:int((len(s) - 1) / 2)]):
    print("No")
elif not isKaibun(s[int((len(s) + 3) / 2)-1:len(s)]):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
sl = s[:(l-1)//2]
sr = s[((l+3)//2 -1):]
#print(sl)
#print(len(sl)//2)
#print(sr)
#print(len(sr)//2)

def f(s):
    l = len(s)
    j = False
    for i in range(l//2 +1):
        if s[i] == s[l-1-i]:
            j = True
        else :
            j = False

    return j

if f(s) and f(sl) and f(sr):
    print("Yes")
else :
    print("No")



#print(f(s))
#print(f(sl))
#print(f(sr))

Submission status: Wrong Answer

Solution code:
s = input()
l = len(s)
sl = s[:(l-1)//2]
sr = s[((l+3)//2 -1):]


def f(s):
    l = len(s)
    j = False
    for i in range(l//2):
        if s[i] == s[l-1-i]:
            j = True
        else :
            j = False

    return j

if f(s) and f(sl) and f(sr):
    print("Yes")
else :
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
a=int(n/2)
s1a=s[0:a]
s2a=s[n-a:n]
s2=s[::-1]
s1b=s1a[::-1]
s2b=s2a[::-1]
print(s,s2,s1a,s1b,s2a,s2b)
if s==s2 and s1a==s1b and s2a==s2b:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
first = s[0:n//2]
second = s[n//2 + 1:n]
flg = 0
for num in range(n//2):
    if(first[num] != first[-num-1] or second[num] != second[-num-1]):
        flg = 1
        break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())

slist = list(S)
N = len(slist)
print(N)
k = int((N-1)/2)

rs = slist[::-1]
front = slist[0:k]
rfront = front[::-1]

if front == rfront and rs == slist:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

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

if s1 == s2[::-1]:
    n1 = len(s1)
    s11 = s1[:(n1-1)//2]
    s12 = s1[(n1+1)//2:]
    if s11 == s12[::-1]:
        n2 = len(s2)
        s21 = s2[:(n2-1)//2]
        s22 = s2[(n2+1)//2:]
        if s21 == s22[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input().rstrip()
n=len(s)
sf,sm,sl=s[:int((n-1)/2)],s[int((n-1)/2)],s[int((n+1)/2):]

if sf==sf[::-1] and sl==sl[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
s1 = list(reversed(s[0:int((len(s)-1)/2)]))
s2 = list(reversed(s[int((len(s)+3)/2)-1:len(s)]))
if s[0:int((len(s)-1)/2)] == s1 and s[int((len(s)+3)/2)-1:len(s)] == s2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    if S[i] != S[-i-1]:
        flag = False
        break

for i in range(math.ceil(len(S) / 4)):
    if S[i] != S[-i]:
        flag = False
        break

for i in range(math.ceil(len(S) / 2), len(S)):
    if S[i] != S[-i-1]:
        flag = False
        break


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

Submission status: Wrong Answer

Solution code:
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    if S[i] != S[-i-1]:
        flag = False
        break

for i in range(math.ceil(len(S) / 4)):
    if S[i] != S[-i]:
        flag = False
        break

for i in range(math.ceil(len(S) / 2), len(S)):
    print(S[i], S[-i-1])
    if S[i] != S[-i-1]:
        flag = False
        break


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

Submission status: Wrong Answer

Solution code:
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    if S[i] != S[-i-1]:
        flag = False
        break

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

for i in range(math.ceil(len(S) / 2), len(S)):
    if S[i] != S[-i-1]:
        flag = False
        break


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

Submission status: Wrong Answer

Solution code:
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    if S[i] != S[-i-1]:
        flag = False
        break

if flag and (len(S) - 3) % 4 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    print(S[i],S[-i-1])
    if S[i] != S[-i-1]:
        flag = False
        break

if flag and (len(S) - 3) % 4 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
List=list(input())
N=len(List)
if 0 not in [int(List[i]==List[(N-3)//2-i]) for i in range((N-1)//2)]\
and List[0:(N-3)//2]==List[(N+1)//2:N-1]:
    print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
List=list(input())
N=len(List)
if N%4==3 and 0 not in [int(List[i]==List[(N-3)//2-i]) for i in range((N-1)//2)]\
and List[0:(N-3)//2]==List[(N+1)//2:N-1]:
    print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
flg = 0
half = len(s)//2
for num in range(half):
    if(not(s[num] == list(reversed(s))[num])):
        flg = 1
        break
if(flg == 0):
    for num in range(half+1, len(s)):
        if(not(s[num] == list(reversed(s))[num])):
            flg = 1
            break
if(flg == 1):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
flg = 0
half = len(s)//2
first_half = half//2
for num in range(first_half):
    if(not(s[num] == list(reversed(s))[num])):
        flg = 1
        break
if(flg == 0):
    for num in range(half+1, len(s)):
        if(not(s[num] == list(reversed(s))[num])):
            flg = 1
            break
if(flg == 1):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
flg = 0
half = len(s)//2
first_half = half//2
for num in range(first_half):
    if(not(s[num] == list(reversed(s))[num])):
        flg = 1
        break
if(flg == 0):
    for num in range(half+2, len(s)):
        if(not(s[num] == list(reversed(s))[num])):
            flg = 1
            break
if(flg == 1):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys

S=list(input())
# 条件1
reverse_S = S.copy()
reverse_S.reverse()
# 条件2
s_2 = S[0:round((len(''.join(S)) - 1) /2)]
s_2_rev = s_2.copy()
s_2_rev.reverse()
# 条件3
s_3 = S[round((len(''.join(S)) + 2) / 2):]
s_3_rev = s_3.copy()
s_3_rev.reverse()

if ''.join(S) != ''.join(reverse_S):
    print('No')
    sys.exit(0)
if ''.join(s_2) != ''.join(s_2_rev):
    print('No')
    sys.exit(0)
if ''.join(s_3) != ''.join(s_3_rev):
    print('No')
    sys.exit(0)


print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
Sr = S[::-1]

if S == Sr and len(S) > 5:
    print('Yes')
    
else:
    print('No')

Submission status: Wrong Answer

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

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

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


list = [new_row,second_row]
ans = 0



for i in list:
   ans +=ispalindrome(i)

if ans == 2:
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

def judge(x):
  if "".join(list(reversed(x))) == x and x[0] == x[2] and x[-3] == x[-1]:
    return "Yes"
  else:
    return "No"
  
print(judge(S))

Submission status: Wrong Answer

Solution code:
S = input()

def judge(x):
  if reversed(x) == x and x[0] == x[2] and x[-3] == x[-1]:
    return "Yes"
  else:
    return "No"
  
print(judge(S))

Submission status: Wrong Answer

Solution code:
s=input()
n1=int((len(s)-1)*0.5)
n2=int((n1-1)*0.5)
flg1=0
flg2=0
#print(len(s),n1,n2)
for i in range(n1):
	if s[i]==s[len(s)-i-1]:
		flg1=1
	else:
		flg1=0
		break
if flg1:
	for i in range(n2):
		if s[i]==s[n1-1-i] and s[i+n1+1]==s[len(s)-1-i]:
			flg2=1
		else:
			flg2=0
if flg1 and flg2:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()
n1=int((len(s)-1)*0.5)
n2=int((n1-1)*0.5)
flg1=0
flg2=0
#print(len(s),n1,n2)
for i in range(n1):
	if s[i]==s[len(s)-i-1]:
		flg1=1
	else:
		flg1=0
if flg1:
	for i in range(n2):
		if s[i]==s[n1-1-i] and s[i+n1+1]==s[len(s)-1-i]:
			flg2=1
		else:
			flg2=0
if flg1 and flg2:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
s=input()
n1=int((len(s)-1)*0.5)
n2=int((n1-1)*0.5)
flg1=0
flg2=0
#print(len(s),n1,n2)
for i in range(n1):
	if s[i]==s[len(s)-i-1]:
		flg1=1
	else:
		flg1=0
for i in range(n2):
	print(s[i],s[n1-1-i],s[i+n1+1],s[len(s)-1-i])
	if s[i]==s[n1-1-i] and s[i+n1+1]==s[len(s)-1-i]:
		flg2=1
	else:
		flg2=0
if flg1 and flg2:
	print('Yes')
else:
	print('No')