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:
# coding: utf-8
S = input()
def check(S):
    ret = True
    for i in range(len(S)//2):
        if S[i] != S[-i-1]:
            ret = False
    return ret
flag = True
if not check(S):
    flag = False
if not check(S[:(len(S)-1)//2]):
    flag = False
if not check(S[(len(S)+3)//2:]):
    flag = False
print("Yes" if flag else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
n = len(s)
front = s[:(n-1)//2]
back = s[(n+3)//2-1:n]
print(front,back)
if s==s[::-1]:
  if front==front[::-1]:
    if back==back[::-1]:
      print('Yes')
    else:
      print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())
N = len(S)
 
small = round((N-1)/2)
smallS = S[:small]
 
big = round((N+3)/2-1)
bigS = ''.join(list(reversed(S[big:])))

allS = ''.join(list(reversed(S)))

if smallS == bigS and S == allS:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
S = input()
result = True
for i in range(len(S)//2):
  if S[i] != S[-1-i]:
    result = False
A = S[:(len(S)-1)//2]
#print(A)
for i in range(len(A)//2):
  if S[i] != S[-1-i]:
    result = False
B = S[(len(S)+2)//2:]
#print(B)
for i in range(len(B)//2):
  if S[i] != S[-1-i]:
    result = False
print("Yes" if result == True else "No")

Submission status: Wrong Answer

Solution code:
S = input()
result = True
for i in range(len(S)//2):
  if S[i] != S[-1-i]:
    result = False
A = S[:(len(S)-1)//2]
for i in range(len(A)//2):
  if S[i] != S[-1-i]:
    result = False
B = S[(len(S)+3)//2:]
for i in range(len(B)//2):
  if S[i] != S[-1-i]:
    result = False
print("Yes" if result == True else "No")

Submission status: Wrong Answer

Solution code:
string = input()

middle=len(string)//2

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

if isPal(string):
    if isPal(string[:middle]):
        print(True)
    else:
        print(False)
else:
    print(False)

Submission status: Wrong Answer

Solution code:
string = input()

middle=len(string)//2

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

if isPal(string):
    if isPal(string[:middle]):
        print("True")
    else:
        print("False")
else:
    print("False")

Submission status: Wrong Answer

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

print(S[:(N-1)//2])
print(S[(N+2)//2:])

if S[:(N-1)//2] == S[(N+2)//2:]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

def f(s):
    half = (len(s) +1)// 2
    if s[:-1 * half] == s[half:]:
        return True
    else:
        return False
    

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

Submission status: Wrong Answer

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

s=input()
print(s)
n=(len(s))
left=s[0:(n-1)//2]
right=s[((n+3)//2-1):]
if left!=right:
  print('No')
if is_kaibun(s):
  if is_kaibun(left):
    if is_kaibun(right):
      print('Yes')
    else:
      print('No')
  else:
     print('No')
else:
  print('No')

Submission status: Wrong Answer

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

cond_1 = S[:int((N-1)/2)]
cond_1_r = cond_1[::-1]

if cond_1 != cond_1_r:
    print('No')
    exit(0)

cond_2 = S[int((N+3)/2-1):]
cond_2_r = cond_2[::-1]

if cond_2 != cond_2_r:
    print('No')
    exit(0)

print('Yes')

Submission status: Wrong Answer

Solution code:
def ispalindrome(s):
	print(s)
	l=len(s)
	for i in range(l//2):
		if s[i]!=s[l-i-1]:
			return False
	return True
s=input()
l=len(s)
if ispalindrome(s) and ispalindrome(s[:l//2]) and ispalindrome(s[(l+1)//2:]):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
s = list(input())
x = len(s)
a = s[:x//2]
b = s[x//2+1:]
b.reverse()
y = len(a)

c = a[:y//2]
d = a[y//2+1:]
d.reverse()
e = b[y//2+1:]
e.reverse()
f = b[:y//2]

ans = "No"
if (x+1)%4 == 0:
    if a == b:
        if c == d:
            if a == b:
                ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
x = len(s)
a = s[:x//2]
b = s[x//2+1:]
b.reverse()
y = len(a)

c = a[:y//2]
d = a[y//2+1:]
d.reverse()
e = b[y//2+1:]
e.reverse()
f = b[:y//2]

print(c, d)
print(e,f)
ans = "No"
if (x+1)%4 == 0:
    if a == b:
        if c == d:
            if a == b:
                ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

a = int((len(s)-1)/2) 
b = int((len(s)+3)/2) +1

s_1 = s[0:a]
s_2 = s[b:len(s)]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

#回文かどうかを判定する関数
#回文であれば1を返し、回文でなければ0を返す
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(A) + kaibunn_judge(B)

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

Submission status: Wrong Answer

Solution code:
S = input()

#回文かどうかを判定する関数
#回文であれば1を返し、回文でなければ0を返す
def kaibunn_judge(moji):
    N = len(moji)
    if N%2 == 0: #偶数個の文字列の場合
        a = 1
        if N == 2:
            a = 0
        else:
            for i, j in zip(list(range(N//2)), list(range(N-1, (N+2)//2 - 2, -1 ))):
                if S[i] == S[j]:
                    pass
                else:
                    a = 0
                    break
    else:   #奇数の場合
        a = 1
        for i, j in zip(list(range((N-1)//2)), list(range(N-1, (N+3)//2 - 2, -1))):
            if S[i] == S[j]:
                pass
            else:
                a = 0
                break
    return a

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

judge = kaibunn_judge(A) + kaibunn_judge(B)

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

Submission status: Wrong Answer

Solution code:
S = input()

#回文かどうかを判定する関数
#回文であれば1を返し、回文でなければ0を返す
def kaibunn_judge(moji):
    N = len(moji)
    if N%2 == 0: #偶数個の文字列の場合
        a = 1
        for i, j in zip(list(range(N//2)), list(range(N-1, (N+2)//2 - 2, -1 ))):
            if S[i] == S[j]:
                pass
            else:
                a = 0
                break
    else:   #奇数の場合
        a = 1
        for i, j in zip(list(range((N-1)//2)), list(range(N-1, (N+3)//2 - 2, -1))):
            if S[i] == S[j]:
                pass
            else:
                a = 0
                break
    return a

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

judge = kaibunn_judge(A) + kaibunn_judge(B)

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

Submission status: Wrong Answer

Solution code:
S = input()

#回文かどうかを判定する関数
#回文であれば1を返し、回文でなければ0を返す
def kaibunn_judge(moji):
    N = len(moji)
    if N%2 == 0: #偶数文字数は回文になりえない
        a = 0
    else:   #奇数の場合
        a = 1
        for i, j in zip(list(range((N-1)//2)), list(range(N-1, (N+3)//2 - 2, -1))):
            if S[i] == S[j]:
                pass
            else:
                a = 0
                break
    return a

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

judge = kaibunn_judge(A) + kaibunn_judge(B)

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

Submission status: Wrong Answer

Solution code:
s = input()

def is_palindrome(s):
  n_str = (len(s) - 1) // 2
  return s[: n_str][::-1] == s[-n_str: ]

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)

Submission status: Wrong Answer

Solution code:
s = input()

def is_palindrome(s):
  n_str = (len(s) - 1) // 2
  return s[: n_str][::-1] == s[-n_str: ]

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

print(result)

Submission status: Wrong Answer

Solution code:
s = input()

def is_palindrome(s):
  n_str = (len(s) - 1) // 2
  return s[: n_str][::-1] == s[-n_str: ]

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

print(result)

Submission status: Wrong Answer

Solution code:
s = input()

def is_palindrome(s):
  n_str = (len(s) - 1) // 2
  return s[: n_str][::-1] == s[-n_str: ]

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

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
a=s[:int((n-1)/2)]
b=s[int((n+3)/2)-1:]
if a==b:
    print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()
if (S == S[::-1]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

x1 = x[0:(N-1)//2]
x2 = x[(N+3)//2-1:N]
if(x1 == ''.join(list(reversed(x1)))):
    if(x2 == ''.join(list(reversed(x2)))):
        print('Yes')
    else:
        print('No')
    
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
N=len(s)//2

def isPalindrome(s):
  n=len(s)//2
  return s[:n]==s[:n:-1]

def isStrongPalindrome(s):
  return isPalindrome(s) and isPalindrome(s[:N])

if isStrongPalindrome(s):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()

#回文かどうかを判定する関数
#回文であれば1を返し、回文でなければ0を返す
def kaibunn_judge(moji):
    N = len(moji)
    if N%2 == 0: #偶数文字数は回文になりえない
        a = 0
    else:   #奇数の場合
        a = 1
        for i, j in zip(range((N-1)//2), range((N+3)//2 - 1, N)):
            if S[i] == S[j]:
                pass
            else:
                a = 0
                break
    return a

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

judge = kaibunn_judge(S_1) + kaibunn_judge(S_2)

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

Submission status: Wrong Answer

Solution code:
a = input()
b = ""
i = len(a)
while i>0:
  i -= 1
  b += a[i]
if a == b:
  i = int((len(a)-1)/2)
  if a[0:i-1] == b[0:i-1]:
    print("yes")

Submission status: Wrong Answer

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

for i in range(n1):
  s1.append(s[i])
for j in range(n2-1,n):
  s2.append(s[j])

ans = ""
def kaibun(l,m):
  r = l[:]
  r.reverse()
  x = m[:]
  x.reverse()
  if l == r and m == x:
    ans = 'Yes'
  else:
    ans = 'No'
  return ans
print(kaibun(s1,s2))

Submission status: Wrong Answer

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

for i in range(n1):
  s1.append(s[i])
for j in range(n2-1,n):
  s2.append(s[j])

ans = ""
def kaibun(l,m):
  r = l
  r.reverse()
  x = m
  x.reverse()
  if l == r and m == x:
    ans = 'Yes'
  else:
    ans = 'No'
  return ans
print(kaibun(s1,s2))

Submission status: Wrong Answer

Solution code:
s = input()
s1 = s[:int((len(s)-1)/2)]
s2 = s[int((len(s)+1)/2):]
flag = True
for i in range(int((len(s)-1)/2)):
	if s1[i] == s2[len(s2)-1-i]:
               continue
	else:
               flag = False
               break
if flag:
               print("Yes")
else:
               print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
    flag = True
    n = 0
    if len(s) == 1:
        pass
    elif len(s) == 2:
        falg = False
    else:
        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')

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
s=input()

def isPalindrome(s):
  return s[:int((len(s)-1)/2)]==s[:int((len(s)-1)/2):-1]

def isStrongPalindrome(s):
  return isPalindrome(s) and isPalindrome(s[:int((len(s)-1)/2)]) and isPalindrome(s[int((len(s)+3)/2-1):])

if isStrongPalindrome(s):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
    flag = True
    n = 0
    if len(s) > 2:
        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
    else:
        flag = False
    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')

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
    flag = True
    n = 0
    if len(s) > 2:
        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
    else:
        flag = False
    return flag
        
s = input()
f = s[:(len(s)-1)//2]
b = s[(len(s)-1)//2+1:]
print(f, b)

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

Submission status: Wrong Answer

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

def palindrome(string):
    if s == s[::-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')

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
    flag = True
    if len(s)%2 == 1:
        for i in range((len(s)-1)//2):
            if s[i:i+1] != s[len(s)-(i+1):len(s)-i]:
                flag = False
                break
    else:
        flag = False
    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')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
if 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')

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0
ans = 0
cnt1 = 0
cnt2 = 0
if len(s) < 7:
    print("No")
    exit()
else:
    
    for i in range(len(s) // 2):
        if s[i] == s[len(s) - i - 1] :
            
            cnt += 1
    if cnt == len(s) // 2:
        ans += 1
    
    
    for i in range(len(s) // 4):
        if s[i] == s[len(s) // 2 - i - 1]:
            cnt1 += 1
    if cnt1 == len(s) // 4:
        ans += 1
    
    for i in range(len(s) // 4):
        if s[len(s) // 2 + i + 1] == s[len(s) - i - 1]:
            cnt2 += 1
    if cnt2 == len(s) // 4:
        ans += 1
    
    if ans == 3:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0
if len(s) < 7:
    print("No")
    exit()
else:
    
    for i in range(len(s) // 2):
        if s[i] == s[len(s) - i - 1]:
            cnt += 1
    if cnt == len(s) // 2:
        print("Yes")
    
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys
inpt = sys.stdin.readline()

stp=len(inpt)//2
scnd_str=stp+1

frst=inpt[:stp]
scnd=inpt[scnd_str:]

if frst!=scnd:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
inpt = sys.stdin.readline()
frst_stp=(len(inpt)-1)//2
stp=frst_stp+1
scnd_stp=frst_stp+2
frst=[]
scnd=[]

for number,i in enumerate(inpt):
    index=number+1
    if index<=frst_stp:
        frst.append(i)
    elif index==stp:
        pass
    else:
        scnd.append(i)

if "".join(frst)=="".join(scnd):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
def judge(s):
  if len(s) % 2 == 0:
    return False
  if ((len(s) - 1) // 2) % 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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def judge(s):
  if len(s) % 2 == 0:
    return False
  if ((len(s) - 1) // 2) % 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]:
      print('A', l, 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')

Submission status: Wrong Answer

Solution code:
import sys


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

c=int(n/2) #添字
#print(c)

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

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

print("Yes")

Submission status: Wrong Answer

Solution code:
S=str(input())
N=int(len(S)/2)
beforeS=S[:N]
afterS=S[N+1:]
n=int(len(beforeS)/2)
bebeS=beforeS[:n]
beafS=beforeS[n+1:]
afbeS=afterS[:n]
afafS=afterS[n+1:]
print("Yes" if beforeS==afterS and bebeS==beafS and afbeS==afafS else "No")

Submission status: Wrong Answer

Solution code:
import sys


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

c=int(n/2) #添字
#print(c)

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

print("Yes")

Submission status: Wrong Answer

Solution code:
import sys


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

c=int(n/2) #添字
#print(c)

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

print("Yes")

Submission status: Wrong Answer

Solution code:
import sys


S=str(input())
n=len(S)
if n%2==0:
  print("No")
  sys.exit()

c=int(n/2) #添字
#print(c)

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

print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
for i in s:
    if s.count(i) == 1:
        y = i
    else:
        y = str(list(s[len(s) // 2]))


str(s)
s_list = s.split(y)
s_list.pop(0)
try:
    for u in s:
        if s.count(u) == 1:
            x = u
        elif len(s_list) == 1:
            r = len(s_list) // 2
            x = s_list[r]

    str(s_list)
    s_list = s.split(x)
except NameError:
    print("yes")
    exit()

if s_list[0] == s_list[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys


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

c=int(n/2)
#print(c)

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

Submission status: Wrong Answer

Solution code:
import sys


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

c=int(n/2)
print(c)

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

Submission status: Wrong Answer

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

def circle_judge(S,N):
	circle=True
	for n in range((N-1)//2):
		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]
		if len(S_h)%2==0:
			circle=False
		else:
			circle=circle_judge(S_h,(N-1)//2)
	return circle

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

Submission status: Wrong Answer

Solution code:
import sys


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

c=int((n/2)+1)-1
#print(c)

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

print("Yes")

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
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)]:
        ans ="No"
print(ans)

Submission status: Wrong Answer

Solution code:
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:]
    
    # print(s1)
    # print(s2)
    for i in range(len(s1)):
        if s1[i]!=s2[i]:
            return False
    return True
    
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]
# print(S1)
# print(S2)
b1 = kaibun(S)
b2 = kaibun(S1)
b3 = kaibun(S2)

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

Submission status: Wrong Answer

Solution code:
def ret_kaibun(Str):
    lens = len(Str)
    #print(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(len(S)):
        if not S[i] == S[len(S)-i-1]:
            return 0
    return 1

if __name__ == '__main__':
    S = input()
    check = kaibun(S)
    if check == 0:
        print('No')
    else:
        ret = ret_kaibun(S)
        if ret == 1 and check == 1:
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def ret_kaibun(Str):
    lens = len(Str)
    #print(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

if __name__ == '__main__':
    S = input()
    ret = ret_kaibun(S)
    if ret == 1:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input();print('YNeos'[s[:2]!=s[-2:]::2])

Submission status: Wrong Answer

Solution code:
s=input();print('YNeos'[s[:4]!=s[:-5:-1]::2])

Submission status: Wrong Answer

Solution code:
s=input();print('YNeos'[s[:3]!=s[-3:]::2])

Submission status: Wrong Answer

Solution code:
s=input();print('YNeos'[s[:4]!=s[-4:]::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input();print('YNeos'[s.count(s[:3])<2::2])

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
S=list(input())
N=len(S)
N_h=(N-1)//2
N_q=(N_h-1)//2

circle=True
for n in range(N_h):
	if S[n]!=S[N-1-n]:
		circle=False
		break
if circle==True:
	for n in range(N_q):
		if S[n]!=S[N_h-1-n]:
			circle=False
			break
if circle==True:
	for n in range(N_h+2,N_h+2+N_q):
		if S[n]!=S[N-1-n]:
			circle=False
			break

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

Submission status: Wrong Answer

Solution code:
S = input()

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

for s in [S[: (len(S) - 1) // 2], S[(len(S) + 3) // 2 - 1:]]:
    if not isOk(s):
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
import random

a = random.uniform(1, 2)

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

Submission status: Wrong Answer

Solution code:
S = input()
if S == S[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
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]]
if S1==S1r and S2==S2r:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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