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

N = len(S)

def check(SS):
    L = len(SS)
    f = 0
    for i in range(L):
        if SS[i] != SS[L - i - 1]:
            f = 1
    if f == 1:
        return False
    else:
        return True


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def ispalindrome(str): return 1 if str == str[::-1] else 0
s = input()
n = len(s)

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

Submission status: Wrong Answer

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

import math
M = math.floor((N-3)/2)

a = 0

for i in range(M):
  if S[i] != S[i+M+2]:
    a = 1
    
if a == 0:
  print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

s = [c for c in s]

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

def check(s):
    left = []
    right = []
    while len(s)>1:
        left.append(s.pop(0))
        right.append(s.pop())
    if left==right:
        return True
    else:
        return False

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

S = read_str()

def solve():
    ans = 0
    N = len(S)
    s1 = S[0: (N - 1) // 2]
    s2 = S[(N + 3) // 2 - 1 : N]
    if s1 != s1[::-1]:
        return 'No'
    if s2[::-1] != s2[::-1]:
        return 'No'
    return 'Yes'

if __name__ == "__main__":
    print(solve())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  S=input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

N = len(S)
k = (N - 1) // 2
ans = True
for i in range(k // 2):
    if S[i] != S[k - 1 - i] or S[k + 1 + i] != S[2 * k - i]:
        ans = False
        break
print('Yes' if ans else 'No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()

N = len(S)
count = 0

before = S[:(N-1)//2]
after = S[(N+3)//2-1:]

for i in range(N//2):
    if before[i] == before[N//2-i-1] and after[i] == after[N//2-i-1]:
        count+=1
        
if count == N//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
r=reversed(s)
if "".join(s)=="".join(r):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
from bisect import bisect, bisect_left, bisect_right

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

S = list(input())
N = len(S)
S_ = [S[i] for i in range(len(S) - 1, -1, -1)]
if S_ != S:
    print("No")
    sys.exit()
S1 = [S[i] for i in range(0, (N - 1) // 2)]
S = S1
S_ = [S[i] for i in range(len(S) - 1, -1, -1)]
if S != S_:
    print("No")
    sys.exit()
N = len(S)
S2 = [S[i] for i in range((N + 3) // 2 - 1, N)]
S = S2
S_ = [S[i] for i in range(len(S) - 1, -1, -1)]
if S != S_:
    print("No")
    sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
# N: odd number. length of S.
# S: 文字列
S = input()


def examine_kaibun(S):
    add_val = len(S)%2
    center = (len(S)-add_val)//2
    return S[:center] == S[-center:]

N = len(S)
pre_judge = examine_kaibun(S[:(N-1)//2])
pos_judge = examine_kaibun(S[(N+3)//2-1:])
if pre_judge and pos_judge:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

N = len(S)

ng = False
for i in range(N):#First
  if S[i] != S[-i]:
    ng = True

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

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
def is_kai(s):
    for i in range(int(len(s)/2)):
        if s[i] != s[-i-1]:
            return False
        return True
if is_kai(s) and is_kai(s[:int((n-1)/2)]) and is_kai(s[int((n+3)/2):]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

def f(s):
    if s == s[::-1]:
        return True
    return False
n = len(s)
o = (n-1)//2
e = (n+3)//2 - 1
if f(s[:o]) and f(s[e:]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math

import itertools

#import bisect

import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)


def main():
    s=input()
    s=list(s)
    n=len(s)
    s1=s[0:(n-1)//2]
    s2=s[(n+3)//2-1:]
    b1=s1[::-1]
    b2=s2[::-1]
#    print(s1,s2,b1,b2)
    if s1==b1 and s2==b2:
        ans="Yes"
    else:
        ans="No"

    print(ans)

if __name__ == "__main__":

    main()

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
def chk(s):
  n=len(s)
  for i in range(n//2):
    if s[i]!=s[n-1-i]:
      return False
if chk(S) and chk(S[:((N-1)//2)+1]) and chk(S[(N+3)//2:]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
def check(st):
    return st == st[::-1]

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

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = list(ns())
n = len(s)
ss = s[:(n-1)//2]
sss = s[(n+3)//2+1:]

if s == list(reversed(s)) and ss == list(reversed(ss)) and sss == list(reversed(sss)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
S = list(S)
a = S[:(N-1)//2]
b = S[(N+1)//2:]
ar = a[::-1]
br = b[::-1]
if a==ar and b == br:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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


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

ans = "No"
if a == a[::-1] and b == b[::-1]:
    ans = "Yes"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from bisect import bisect_right, bisect_left
import random
from itertools import permutations, accumulate, combinations, product
from re import split
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gamma, log
from operator import mul
from functools import reduce
from copy import deepcopy
import re

sys.setrecursionlimit(2147483647)
INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7


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

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
p = list(s[0:(n-1)//2])
q = list(s[(n+3)//2-1:n])

p_ = list(reversed(p))
q_ = list(reversed(q))

#print(p)
#print(p_)
#print(q)
#print(q_)

for i in range(len(p)):
    if p[i] != p_[i]:
        print('No')
        exit()

for i in range(len(q)):
    if q[i] != q_[i]:
        print('No')
        exit()
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
# coding: utf-8

s = input()
n = len(s)
ss = s[:(n-1)//2]
for i in range((n-1)//4):
    if not ss[i] == ss[-1*(i+1)]:
        print('No')
        break
else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=input()
r=s[0:(len(s)-1)//2]
q=s[(len(s)+1)//2:len(s)]
count = 0
zyoukyou = "Yes"
for i in range(len(r)):
	if r[i]!=r[-1-i]:
		count += 1
if count != 0:
	zyoukyou = "No"
count = 0
for i in range(len(q)):
	if q[i]!=q[-1-i]:
		count += 1
if count != 0:
	zyoukyou = "No"
print(zyoukyou)

Submission status: Wrong Answer

Solution code:
S = str(input())
temp = len(S)
if S == S[::-1]:
    tempi =S[0::(temp-1)//2+1] 
    if tempi == tempi[::-1]:
        tempi2 = S[0::(temp+3)//2+1]
        if tempi2 == tempi2[::-1]:
            print('Yes', end='')
        else:
            print('No', end='')
    else:
        print('No', end='')
else:
    print('No', end='')

Submission status: Wrong Answer

Solution code:
hoge=input()
n=len(hoge)
aaa=hoge[1+n//2:]
bbb=hoge[:n//2]
ccc=aaa[::-1]
ddd=bbb[::-1]
if(aaa==ccc and bbb==ddd):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

s = input()
len_s = len(s)
kaibun = s == s[::-1]
left = s[:3] == s[:3][::-1]
right = s[len_s-3:] == s[len_s-3:][::-1]
print("Yes" if kaibun and left and right else "No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
def is_kai(s):
    for i in range(int(len(s)/2)):
        if s[i] != s[-i-1]:
            return False
        return True
if is_kai(s) and is_kai(s[:int((n-1)/2)]) and is_kai(s[int((n+3)/2)-1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

index1 = (n-1)//2
index2 = (n+3)//2

flag = True
if s[:index1] == s[:index1][::-1]:
    if s[index2+1:] == s[index2+1:][::-1]:
        print('Yes')
        flag = False
        
if flag:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
def f(s):
    for i in range((N-1)//2):
        if s[i] != s[N-i-1]:
            return False
    for i in range(((N-1)//2-1)//2):
        if s[i+(N//2)+1] != s[N-i-1]:
            return False
    return True

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

Submission status: Wrong Answer

Solution code:
# inp = input().split()

s = input()

n = len(s)

a = s[:(n-1)//2]

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

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

b_r = "".join(list(reversed(b)))

# print(a_r)
# print(b_r)

if a==a_r and b==b_r:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
n = len(S)
tmp = (n - 1) // 2
ans = S[:tmp] == S[::-1][:tmp]
print('Yes' if ans else 'No')

Submission status: Wrong Answer

Solution code:
S = list(input())

N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+5)//2:]

R = list(reversed(S))
R1 = list(reversed(S1))
R2 = list(reversed(S2))

if S == R and S1 == R1 and S2 == R2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# N,M = map(int, input().split())
S = input()
len_s = len(S)
_1 = S[:(len_s-1)//2]
_2 = S[(len_s+2)//2:]

_1_rev = ''.join(list(reversed(_1)))
_2_rev = ''.join(list(reversed(_2)))


if _1_rev == _1:
  if _2_rev == _2:
    print('Yes')
    exit()

print('No')

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
S1=S[0:(N-1)//2]
S2=S[(N+3)//2-1:]
ans=False
if S1==S1[::-1] and S2==S2[::-1]:
    ans=True
print('Yes' if ans else 'No')

Submission status: Wrong Answer

Solution code:
def isKaibun(s):
  i = 0
  ans = True
  l = len(s)//2
  while i < l:
    if s[i] != s[-1-i]:
      ans = False
      break
    i += 1
  return ans

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

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
ans = "Yes"
if s != s[::-1]:
    ans = "no"
else:
    if s[:(n//2):-1] != s[:(n//2)]:
        ans = "no"
    if s[n//2 + 1::] != s[:(n//2):-1]:
        ans = "no"

print(ans)

Submission status: Wrong Answer

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

s3 = s[(n+3)//2-1:]
s4 = s3[::-1]

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

Submission status: Wrong Answer

Solution code:
s=list(input())
r=reversed(s)
if "".join(s)=="".join(r):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
n=len(s)
s1=s[:n//2]
s2=s[(n+1)//2:n]
if s1==s1[::-1] and s2==s2[::-1]:
	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:]

def solve(s):
    if s == s[::-1]:
        return True
    return False

print(S,S1,S2)
if solve(S) and solve(S1) and solve(S2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    s = list(input())
    n = len(s)
    srev = list(reversed(s))
    for i in range(n):
        if not s[n-1-i] == srev[i]:
            print(no)
            exit()
    for i in range((n-1)//2):
        if not s[i] == srev[i+1+(n-1)//2]:
            print(no)
            exit()
    print(yes)



main()

Submission status: Wrong Answer

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


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

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 + 1:] == s[(n+3)//2 + 1:][::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = [i for i in input()]
s1, s2 = s[:(len(s))//2], s[(len(s)+3)//2-1:]
for i in range(len(s)//4):
    if s1[i] != s1[-i-1] or s2[i] != s2[-i-1]:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def kaibun(s):
  n = len(s)
  judge = 1
  for i in range(n):
      if(s[i] != s[-(i+1)]):
        judge = 0
  return judge      

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

if(kaibun(s1)*kaibun(s2)):
  print('Yes')
else:  
  print('No')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    N = len(S)
    idx_a = ((N - 1) // 2)
    idx_b = ((N + 3) // 2) - 1
    A = S[:idx_a]
    B = S[idx_b:]
    if A == A[::-1] and B == B[::-1]:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

A=S[:(N-1)//2]
B=S[(N+3)//2-1:]
for i in range(len(A)):
	if A[i]!=A[-(i+1)]:
		print("No")
		exit()
for i in range(len(B)):
	if B[i]!=B[-(i+1)]:
		print("No")
		exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
a = s[0:(len(s)-1)//2]
b = s[(len(s)+3)//2-1:len(s)]
c = list(reversed(a))
d = list(reversed(b))
if a==c and b == d:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
def check(st):
    return st == st[::-1]

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

Submission status: Wrong Answer

Solution code:
s = input()

res = 'Yes'
if s != s[::-1]:
    res = 'No'
t = s[:(len(s)-1)//2]
if t != t[::-1]:
    res = 'Yes'
u = s[((len(s)+3)//2)-1:len(s)]
if u != u[::-1]:
    res = 'No'

print(res)

Submission status: Wrong Answer

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

x1 = s[:n//2]
x2 = s[n//2+1:]

if x1 == x1[::-1] and x2 == x2[::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = str(input())
temp = len(S)
if S == S[::-1]:
    tempi =S[0::(temp-1)//2+1] 
    if tempi == tempi[::-1]:
        tempi2 = S[0::(temp+3)//2+1]
        if tempi2 == tempi2[::-1]:
            print('YES', end='')
        else:
            print('NO', end='')
    else:
        print('NO', end='')
else:
    print('NO', end='')

Submission status: Wrong Answer

Solution code:
def is_palin(s):
    rs = s[::-1]
    for i,j in zip(s, rs):
        if i != j:
            return False
    return True

S = input().strip()
N = len(S)

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

if is_palin(s1) and is_palin(s2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#coding:utf-8
import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    S = input()
    N = len(S)
    def isP(S):
        return S == S[::-1]
    YN(isP(S[:(N-1)//2]) and isP(S[((N+3)//2-1):]))
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
s = input()
n = len(s)
pre = s[:(n-1)//2]
suf = s[(n+3)//2-1:]
if pre == pre[::-1] and suf == suf[::-1]:
    print("Yes")
else: print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

def f(s):
    n = len(s)
    return s[:n//2] == s[n//2 + 1:]


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

Submission status: Wrong Answer

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

if S[0: (N - 1) // 2] == S[0: (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:
import sys
def is_pal(s):
    i,j=0,len(s)-1
    while i<=j:
        if s[i]==s[j]:
            i+=1
            j-=1
        else:
            return False
    return True
s=sys.stdin.readline()[:-1]
n=len(s)
if n%2!=0:
    if is_pal(s[:n//2]) and is_pal(s[n//2+1:]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ans='No'
S1 = S[:(len(S)-1)//2]
S2 = S[(len(S)+1)//2:]
if S1 == S1[::-1] and S2 == S2[::-1]:
  ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def is_ok(S):
    N = len(S)
    for i in range(N):
        if S[i]!=S[-i-1]:
            return False
    return True
def main():
    S=ST()
    N=len(S)
    a = is_ok(S[:(N-1)//2])
    b = is_ok(S[(N+3)//2-1:])
    if(a and b):
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

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


def f(x):
    return x == x[::-1]


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

Submission status: Wrong Answer

Solution code:
s = input()

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

n = len(s)

first = s[:(n-1)//2]
second = s[(n+1)//2:]



if(is_kaibun(first) and is_kaibun(second)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
S=list(input())
N=len(S)
T=S[:int((N-1)/2)]

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


if T==T[::-1] and U==U[::-1]:
    print("Yes")
else:
    print("No")
#print(T,U)

Submission status: Wrong Answer

Solution code:
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]

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

Submission status: Wrong Answer

Solution code:
s = list(input())
s1 = s[:(len(s)-1)//2]

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

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

print(ans)

Submission status: Wrong Answer

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


s = input()
n = len(s)
mae = s[:(n-1)//2]
usito = s[(n+3)//2-1:]
meee = mae[::-1]
usi = usito[::-1]
if meee == mae and usi == usito:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = input()
N = len(S)

ans = 'Yes'

mid1 = (N - 1) // 2
mid2 = ((N + 3) // 2) - 1

one = S[:mid1]
two = S[mid2:]

if not(one == one[::-1] and two == two[::-1]):
    ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
S0 = S[:(N - 1) // 2]
S1 = S[(N + 1) // 2:]
print(S0, S1, S)
if S0 == S0[::-1] and S1 == S1[::-1] and S == S[::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
flag = True
for i in range(n):
    if s[i] != s[n - i - 1]:
        flag = False

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

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