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:
# B - String Palindrome
def main():
    S = input().rstrip()
    mid = len(S) // 2 + 1
    left, right = S[:mid], S[mid + 1 :]
    is_palindrome = S == S[::-1]
    check_left = left == left[::-1]
    check_right = right == right[::-1]
    print("Yes" if is_palindrome and check_left and check_right else "No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# B - String Palindrome
def main():
    S = input().rstrip()
    N = len(S)
    left, right = S[: (N - 1) // 2], S[(N + 1) // 2 :]
    check_left = left == left[::-1]
    check_right = right == right[::-1]
    print("Yes" if check_left and check_right else "No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

leee = len(a)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input();n=len(s)//2;print('YNeos'[s[-n:]+s[n-1::-1]<s[:n]*2::2])

Submission status: Wrong Answer

Solution code:
s=input();n=len(s)//2;print('YNeos'[s[n-1::-1]+s[:n]>s[-n:]*2::2])

Submission status: Wrong Answer

Solution code:
s=input();n=len(s)//2;print('YNeos'[s[:n]+s[-n:]>s[n-1::-1]*2::2])

Submission status: Wrong Answer

Solution code:
#!python3

# input
S = input()


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


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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
print(S1,S2)
if S1==S2 and S1==S1[::-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:])))

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

Submission status: Wrong Answer

Solution code:
s=input()
l=int(len(s))
ss=s[0:int((l-1)/2)]
sl=s[int((l+1)/2):l]
l1=int(len(ss))

s0=ss[0:int((l1-1)/2)]
s1=''.join(reversed(list(ss[int((l1+1)/2):l])))

if ss == sl and s0 == s1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()
l=int(len(s))
print(l)
ss=s[0:int((l-1)/2)]
sl=s[int((l+1)/2):l]
l1=int(len(ss))

s0=ss[0:int((l1-1)/2)]
s1=''.join(reversed(list(ss[int((l1+1)/2):l])))

if ss == sl and s0 == s1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# inputもらう
S = str(input())
N = len(S)

# 1文字目からの位置
small = round((N-1)/2)
smallS = S[:small]

# 最後尾からの位置
big = round((N+3)/2)-1
bigS = ''.join(list(reversed(S[big:])))

# 処理
if smallS == bigS:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
# Author: cr4zjh0bp
# Created: Sun Mar 22 11:54:41 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

s = ns()
n = len(s)
flag = True
if s != reversed(s):
    flag = False
for i in range((n - 1) // 2):
    p = (n - 1) // 2
    if s[i] != s[p - i - 1]:
        flag = False

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

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

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)

k = s[:(n-1)//2]
r = s[(n+1)//2:]

if (k==k[::-1] and r==r[::-1]):
    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+1)//2:] == S[(N+1)//2::-1] :
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def kaibun(s):
    length = len(s)
    if s == s[-length:]:
            return True
    else:
        return False

s = input()
if kaibun(s):
    half = int(len(s)//2)
    if kaibun(s[:half]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def palind(LIST, N):
    inv = LIST[::-1]
    for i in range(N):
        if LIST[i] != inv[i]:
            return False
    return True

S = list(input())
n = len(S)
flag = palind(S, n)

front = S[:((n+1)//2-1)]
rear = S[((n+3)//2-1):]
n = len(front)
flag = palind(front, n)
flag = palind(rear, n)

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

Submission status: Wrong Answer

Solution code:
def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True

S = list(input())
n = len(S)
flag = palind(S, n)

front = S[:((n+1)//2-1)]
rear = S[((n+3)//2-1):]
n = len(front)
flag = palind(front, n)
flag = palind(rear, n)

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

Submission status: Wrong Answer

Solution code:
def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True

S = list(input())
n = len(S)
print(S)
flag = palind(S, n)

front = S[:((n+1)//2-1)]
rear = S[((n+3)//2-1):]
n = len(front)
flag = palind(front, n)
flag = palind(rear, n)

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

Submission status: Wrong Answer

Solution code:
def getInput():
    return list(input().rstrip())

def firstCheck(S):
    N = len(S)-1
    c = int((N)/2)

    ret = True
    for i in range(c):
        # Sの回文判定
        if not S[i] == S[N-i]:
            ret = False;break;
    if ret:
        a = [str(S[i]) for i in range(c)]
        b = [str(S[i]) for i in range(c+1, N+1)]
        ret = True if secondCheck(a) and secondCheck(b)  else False
            
    return ret

def secondCheck(S):
    N = len(S)-1
    c = int((N)/2)
    ret = True

    for i in range(c):
        if not S[i] == S[N-i]:
            ret = False;break;
    return ret

S = getInput()
print('No') if not firstCheck(S) else print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return True
    return False

def judge():
    S = list(input())
    n = len(S)
    if palind(S, n):
        return False

    front = S[:((n+1)//2-1)]
    rear = S[((n+3)//2-1):]
    n = len(front)
    if palind(front, n):
        return False
    if palind(rear, n):
        return False
    return True

#main
if judge:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def getInput():
    return list(input().rstrip())

def firstCheck(S):
    N = len(S)-1
    c = int((N)/2)

    ret = True
    for i in range(c):
        # Sの回文判定
        if not S[i] == S[N-i]:
            ret = False;break;
    if ret:
        a = [str(S[i]) for i in range(c)]
        b = [str(S[i]) for i in range(c+1, N+1)]
        ret = True if secondCheck(a) and secondCheck(b)  else False
            
    return ret

def secondCheck(S):
    N = len(S)-1
    c = int((N)/2)
    ret = True

    for i in range(c):
        if not S[i] == S[N-i]:
            ret = False;break;
    return ret

S = getInput()
if len(S) < 5:
    print('No')
else:
    print('No') if not firstCheck(S) else print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def rec(i, j):
    if(i >= j):
        return True
    if(S[i] != S[j]):
        return False
    rec(i+1, j-1)
    return True  # 到達しない


ans1 = rec(0, N-1)
ans2 = rec(0, int((N-1)/2)-1)
ans3 = rec(int((N+3)/2)-1, N-1)
if(not(ans1 & ans2 & ans3)):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
st=input()
def iskaibun(s):
  if(s==""):
      return 1;
  else:
      if(s[0]==s[-1]):
          return iskaibun(s[1:-1])
      else:
          return 0

l = len(st)
q = (l-1)//2
st1 = st[0:q]

st2 = st[q+1:]

if(st1 == st2[:-1] and iskaibun(st1)==1 and iskaibun(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
st=input()
def iskaibun(s):
  print(s)
  if(s==""):
      return 1;
  else:
      if(s[0]==s[-1]):
          return iskaibun(s[1:-1])
      else:
          return 0

l = len(st)
q = (l-1)//2
st1 = st[0:q]

st2 = st[q+1:]


if(st1 == st2[::-1] and iskaibun(st1)==1 and iskaibun(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def check1(z):
    for i in range(len(s[:z])):
        if s[i] == s[z - 1 - i]:
            continue
        else:
            return False
    return True
 
def check2(z):
    count = 1
    for i in range(z, len(s)):
        if s[i-1] == s[len(s)-count]:
            count += 1
        else:
            return False
    return True
 
s = input()
N = len(s)
    
a = (N - 1) // 2
b = (N + 3) // 2
flag1 = check1(a)
flag2 = check2(b)
if flag1 == True and flag2 == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
st=input()
def iskaibun(s):
  print(s)
  if(s==""):
      return 1;
  else:
      if(s[0]==s[-1]):
          return iskaibun(s[1:-1])
      else:
          return 0

l = len(st)
q = (l-1)//2
st1 = st[0:q]

st2 = st[q+1:]

if(st1 == st2[:-1] and iskaibun(st1)==1 and iskaibun(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
st=input()
def iskaibun(s):
  print(s)
  if(s==""):
      return 1;
  else:
      if(s[0]==s[-1]):
          return iskaibun(s[1:-1])
      else:
          return 0

l = len(st)
q = (l-1)//2
st1 = st[0:q]

st2 = st[q+1:]

if(st1 == st2[-1] and iskaibun(st1)==1 and iskaibun(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
st=input()
def iskaibun(s):
    if((s=="")==False):
        return 1;
    else:
        if((s[0]==s[-1])==True):
            return iskaibun(s[1:-1])
        else:
            return 0
l = len(st)
q = (l-1)//2
st1 = st[0:q]
st2 = st[q+1:]
if(iskaibun(st1)==1 and iskaibun(st2)==1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
l = (n - 1)
r = (n + 3)
if s == s[::-1] and s[0:l] == s[0:l][::-1] and s[r-1:n] == s[r-1:n][::-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

def check_is_kaibun(s):
    is_kaibun = True
    if len(s)//2 ==0:return False
    for i in range(len(s)//2):
         if s[i] != s[len(s)-1-i]:
                return False
    return is_kaibun
  
if check_is_kaibun(S) == check_is_kaibun(S[:(n-1)//2]) == check_is_kaibun(S[(n+1)//2:]) == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

rs = s[::-1]


if s == rs:
  n = (len(s) -1 )//2
  nn = (len(s) +3 )//2

  ss = s[:n]
  rss = ss[::-1]
  sss = s[nn:]
  rsss = sss[::-1]
  if ss == rss and sss == rsss:
    print("Yes")
  else:
    print("No")

else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) % 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1] or len(i2) == 1:
        return(True)
    return(False)

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

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def palin(a):
    if(a==a[::-1]):
        return True
    else:
        return False
def strong(s):
    if( palin(s[:(len(s)-1)//2]) and palin(s[((len(s)+3)//2)-1:]) ):
        return ("Yes")
    else:
        return("No")
s=input()
print(strong(s))

Submission status: Wrong Answer

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

def circ_check(s):
    s_rev=s[::-1]
    n=len(s)
    if n%2==1:
        half_n=int((n-1)/2)
    else:
        half_n=int(n/2)
    print(s_rev[0:half_n],s[0:half_n])
    if s_rev[0:half_n] ==s[0:half_n]:
        s_check=1
    else:
        s_check=0
    return(s_check) 


res1=circ_check(s)
res2=circ_check(s[0:int((n-1)/2)])
res3=circ_check(s[int((n-1)/2+1):len(s)])
if res1*res2*res3==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

rs = s[::-1]


if s == rs:
  n = (len(s) -1 )//2
  nn = (len(s) +3 )//2
  if n % 2 :
    ss = s[:n]
    rss = ss[::-1]
    sss = s[nn:]
    rsss = sss[::-1]
    if ss == rss and sss == rsss:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

s=input()
print(s[:(len(s)-1)//2],s[(len(s)+3)//2-1:])
if judge(s)==False:
  print('No')
else:
  if judge(s[:(len(s)-1)//2])==False:
    print('No')
  else:
    if judge(s[(len(s)+3)//2-1:])==False:
      print('No')
    else:
      print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s=input()
if judge(s)==False:
  print('No')
else:
  if judge(s[:(len(s)-1)//2])==False:
    print('No')
  else:
    if judge(s[(len(s)+3)//2:])==False:
      print('No')
    else:
      print('Yes')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
S = input()
flag = True
cnt = 0
if len(S) % 2 == 1:
    cnt += 1
if S[:len(S)//2] != S[len(S)//2 + cnt:]:
    flag = False
# print(S[:len(S)//2], S[len(S)//2+1:])
s = S[:len(S)//2]
# print(s)
if s[:len(s)//2] != s[len(s)//2 + cnt:]:
    flag = False
s = S[(len(S)+3)//2-1:]
# print(s)
if s[:len(s)//2] != s[len(s)//2 + cnt:]:
    flag = False
# print(s[:len(s)//2], s[len(s)//2 + cnt:])
print("Yes" if flag else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def F(s):
	sL = len(s) // 2
	#print(s[sL - 1::-1] + " " + s[sL + 1:])
	return s[sL - 1::-1] in s[sL + 1:]

S = input()
fS = S[:len(S) // 2]
lS = S[len(S) // 2 + 1:]
if F(S) and F(fS) and F(lS):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
S_mae = S[:int((N-1)/2)]
S_usi = S[int((N+1)/2):]

if (S_mae[:len(S_mae)] == S_mae[::-1]) and (S_usi[:len(S_usi)] == S_usi[::-1]):
    print("Yes")
else:
    print("No")
    
#print(S_mae)
#print(S_usi)

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1] or len(i2) == 1:
        return(True)
    return(False)

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

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1] or len(i2) == 1:
        return(True)
    return(False)

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

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
     print('Yes')
  else:
    print('No')
else:
     print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
S_mae = S[:int(N/2)]
S_usi = S[int(N/2)+1:]

if (S_mae[:len(S_mae)] == S_mae[::-1]) and (S_usi[:len(S_usi)] == S_usi[::-1]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
N = len(S)
S_mae = S[:int(N/2)]
S_usi = S[int(N/2)+1:]

if (S_mae[:len(S_mae)] == S_mae[::-1]) and (S_usi[:len(S_usi)] == S_usi[::-1]):
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1] or len(i) == 1:
        return(True)
    return(False)

def check2(i):
    i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

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

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

def jds(strin):
    js = 0
    nn = len(strin)
    for kk in range(int(nn / 2)):
        if strin[kk] == strin[nn - kk -1]:
            js = 1
    #print(strin)
    if nn == 1:
        js = 1
    return js
 
a = input()
jud = 0

leee = len(a)

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

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
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)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    def check(s):
        return s == s[::-1]
    s = input()
    n = len(s)
    if check(s[:(n-1)>>1]) and check(s[((n+3)>>1)-1:]):
        print("Yes")
    else:
        print("No")
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
l = (n-1)//2
r = (n+3)//2
if s[0:l] == s[0: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)
n_1 = (N - 1) // 2
n_2 = (N + 3) // 2

s_1 = S[:n_1]
s_2 = S[n_2 - 1:]

ans = "Yes"

for i in range(len(s_1)):
    if s_1[i] != s_1[-i - 1]:
        ans = "No"

for i in range(len(s_2)):
    if s_2[i] != s_2[-i - 1]:
        ans = "No"

print(ans)

Submission status: Wrong Answer

Solution code:
def gaus(n):
    if n//1<n:
        return int(n+1)
    return int(n)
def hante(S):
    n=len(S)
    for i in range(n//2):
        if S[i]!=S[n-i-1]:
            return False
    return True
S=input()
S1=S[:len(S)//2]
S2=S[gaus(len(S)/2):]

if hante(S1)==True and hante(S2)==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def check(s):
  if(s==s[::-1]):
    return True
  else:
    return False
  
n = len(s)
if(n==3):
  print('No')
elif(check(s[:(n-1)//2])):
  if(check(s[((n+3)//2)-1:])):
     print('Yes')
  else:
    print('No')
else:
     print('No')

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

def check2(i):
    i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

s2 = s[0:(len(s) - 1) // 2]
if len(s2) / 2 != 0:
    s3 = s[(len(s) - 1) // 2 + 1:len(s)]
else:
    s3 = s[(len(s) - 1) // 2:len(s)]

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

rs = s[::-1]


if s == rs:
  n = (len(s) -1 )//2
  if n % 2 :
    ss = s[0:n]
    rss = ss[::-1]
    if ss == rss :
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

def check2(i):
    i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

s2 = s[0:(len(s) - 1) // 2]
if len(s2) != 0:
    s3 = s[(len(s) - 1) // 2 + 1:len(s)]
else:
    s3 = s[(len(s) - 1) // 2:len(s)]

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

def check2(i):
    i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

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

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    i2 = i[len(i) // 2 + 1:len(i)]
    if i[0:len(i) // 2] == i2[::-1]:
        return(True)
    return(False)

s2 = s[0:(len(s) - 1) // 2]
if len(s2) / 2 != 0:
    s3 = s[(len(s) - 1) // 2 + 1:len(s)]
else:
    s3 = s[(len(s) - 1) // 2:len(s)]
    
if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
n1 = int((n-1)/2)
n2 = int((n+3)/2)
def check1(s,a):
  data = True
  num = 1
  for i in range(0, a):
    if s[i] != s[a-num]:
      data = False
      break
    num += 1
  return data

def check2(s,a):
  data = True
  num = 1
  for i in range(n2-1,len(s)):
    if s[i] != s[len(s)-num]:
      data = False
      break
    num += 1
  return data
if n == 3:
    if s[0] != s[2]:
        f = False
    else:
        f = True
else:
    f = check1(s, n1)
    f = check2(s, n2)

if f == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2

        a = s[0:int(A)]
        b = s[int(B)-1:N]

        c = b
        if a != ''.join(list(reversed(c))):
            return False

        if kaibun0(a):
                return True
        else:
            return False

    
    return kaibun0(S)

if kaibun(S):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = input()
b = len(a)
c = a[(b-1)//2+1:b]
d = a[(b-1)//4:(b-1)//2]
e = a[3*b//4+1:b]
f = a[(b+3)//2+1:-((-3*b)//4)+1]
if a[0:(b-1)//2] == c[::-1]:
    if a[0:-((-b+1)//4)] == d[::-1]:
        if a[(b+3)//2+1:-((-3*b)//4)+1] == e[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
     print("No")

Submission status: Wrong Answer

Solution code:
S = input()
j = "No"
N = len(S)
pipot1 = int((N - 1) / 2)
pipot2 = int((N + 3) / 2)
S1 = S[:pipot1]
S2 = S[pipot2:]
for i in range(int(len(S1)/2)):
    if S1[i] == S1[-(i+1)]:
        j='No'
    else:
        break
        
    for j in range(int(len(S2)/2)):
        if S2[i] == S2[-(i+1)]:
            j = 'No'
        else:
            break
            
        j = "Yes"

print(j)

Submission status: Wrong Answer

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

tmp1, tmp2 = [], []
flag = 0
for i in range(int((N-1)/2)):
  tmp1.append(S[i])
for i in range(int((N+3)/2)):
  tmp2.append(S[-1-i])
#print(tmp1, tmp2)
if tmp1 == tmp2:
  flag = 1
  
if flag == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

S1 = S[0:N//2]
S1_1=S1[0:len(S)//4]
S1_2=S1[len(S)//4+1:]
print(S1_1, S1_2)

S2= S[N//2+1:]
S2_1=S2[0:len(S)//4]
S2_2=S2[len(S)//4+1:]
print(S2_1, S2_2)

if S1_1 == S1_2 and S2_1 == S2_2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

rs = s[::-1]

if len(s) == 3 :
  print("No")
  exit
if s == rs:
  n = (len(s) -1 )//2
  if n % 2 :
    ss = s[0:n]
    rss = ss[::-1]
    if ss == rss :
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

Flag1 = False
Flag2 = False
Flag3 = False

if S == S[::-1]:
    Flag1 = True

if S[:(N-1)//2] == S[:(N-1)//2:-1]:
    Flag2 = True

if S[(N+3)//2-1:] == S[(N+3)//2-3::-1]:
    Flag3 = True

if Flag1 and Flag2 and Flag3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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