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:
import sys
s = input()
c= 0
for i in range(len(s)//2):
    if s[i] != s[(len(s)-1)//2-i-1]:
        c = 0
        sys.exit()
    elif  s[(len(s)-1)//2+i+1] != s[len(s)-i-1]:
        c = 0
        sys.exit()
    else:
        c +=1

if c > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
s = input()
c= 0
for i in range(len(s)//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]):
        c = 0
        break
    else:
        c +=1

if c ==(len(s)//2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
c= 0
for i in range((len(s)-1)//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]):
        c = 0
        break
    else:
        c +=1

if c ==(len(s)-1)//2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

s = input()
c= 0
for i in range((len(s)-1)//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]):
        c = 0
        break
    else:
        c +=1

if c >0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
s = input()
c= 0
for i in range((len(s)-1)//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]):
        print("No")
        sys.exit()
    else:
        c +=1

if c >0:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
s = input()
c= 0
for i in range(len(s)):
    if s[i] != s[len(s)-i-1]:
        print("No")
        sys.exit()
    else:
        c +=1

if c >0:
    print("Yes")

Submission status: Wrong Answer

Solution code:
old_s=list(str(input()))
new_s = list(reversed(old_s))
if len(old_s)>=7:
  if old_s==new_s and old_s[0:3]==new_s[-3:] and new_s[4]==new_s[6]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
s=input()
A=list(s)
N=len(A)
M=N-1
R=M//2
for k in range(R+2):
  if A[k]!=A[M-k]:
    print("No")
    sys.exit()
  if A[k]!=A[R-1-k]:
    print("No")
    sys.exit()
  if A[k+R+1]!=A[M-k]:
    print("No")
    sys.exit()
  else:
    print("Yes")
    sys.exit()

Submission status: Wrong Answer

Solution code:
import sys
s=input()
A=list(s)
N=len(A)
M=N-1
R=M//2
k=0
while k<M/2:
  if A[k]!=A[M-k]:
    print("No")
    sys.exit()
  if A[k]!=A[R-1-k]:
    print("No")
    sys.exit()
  if A[k+R+1]!=A[M-k]:
    print("No")
    sys.exit()
  else:
    print("Yes")
    sys.exit()
  k=k+1

Submission status: Wrong Answer

Solution code:
a = str(input())
b = len(a)
c = int((b-1)/2)
d = int((b+3)/2)

g = a[:c]
h = a[d-1: ]

C = []

for i in range(int(len(g)+1)):
    if i!=0:
        G = g[int(-i)]
        C.append(G)
    


W = []

for I in range(int(len(h)+1)):
    if I!=0:
        H = h[int(-I)]
        W.append(H)
N = ''.join(C)
M = ''.join(W)
if N ==g  and M ==h :
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = str(input())
b = len(a)
c = int((b-1)/2)
d = int((b+3)/2)

g = a[:c]
h = a[d-1: ]
C = []
L = []
for i in range(int(len(g))):
    G = g[int(i-len(g))]
    C.append(G)
    A = g[i]
    L.append(A)

W = []
Q = []
for I in range(int(len(h))):
    H = h[int(I-len(h))]
    W.append(H)
    E = h[I]
    Q.append(E)
if C == L and W == Q:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())
m = s[::-1]
n = len(s)
c=0
for i in range(int((n-1)/2)):
    if (s[i]!=m[i]):
        print("No")
c=1

a = s[:int((n-1)/2)]
b = s[int((n+1)/2):]
x = a[::-1]
y = b[::-1]
# print(a)
# print(b)

l = (n+1)/4
    # print(l)

for i in range(int(l)):
    if (a[i]!=x[i])or (b[i]!=y[i]):
        print("No")
        c =1
        break
if(c==0): 
     print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
if n%2==0:
    print("No")
else:
    a = s[:int((n-1)/2)]
    b = s[int((n+1)/2):]
    x = a[::-1]
    y = b[::-1]
    # print(a)
    # print(b)

    l = (n+1)/4
    # print(l)
    c = 0
    for i in range(int(l)):
        if (a[i]!=x[i])or (b[i]!=y[i]):
            print("No")
            c =1
            break
    if(c==0): 
     print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
if n%2==0:
    print("No")
else:
    a = s[:int((n-1)/2)]
    b = s[int((n+1)/2):]
    x = a[::-1]
    y = b[::-1]
    # print(a)
    # print(b)

    l = (n+1)/4
    # print(l)
    c = 0
    for i in range(int(l)):
        if (a[i]!=x[i])or (b[i]!=y[i]):
            print("No")
            c =1
            break
if(c==0):
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
if n%2==0:
    print("No")
else:
    a = s[:int((n-1)/2)]
    b = s[int((n+1)/2):]
    x = a[::-1]
    y = b[::-1]
    print(a)
    print(b)

    l = (n+1)/4
    # print(l)
    c = 0
    for i in range(int(l)):
        if (a[i]!=x[i])or (b[i]!=y[i]):
            print("No")
            c =1
            break
if(c==0):
    print("Yes")

Submission status: Wrong Answer

Solution code:
def is_palindrome(s):
    if len(s) > 1:
        i = 0
        n = len(s)-1
        while s[i] == s[n]:
            i += 1
            n -= 1
            if i >= n:
                break
        else:
            return False
        return True
    elif len(s) == 1:
        return True
    else:
        return False

s = input()
n = len(s)

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

Submission status: Wrong Answer

Solution code:
def is_palindrome(s):
    if len(s) > 1:
        i = 0
        n = len(s)-1
        while s[i] == s[n]:
            i += 1
            n -= 1
            if i >= n:
                break
        else:
            return False
        return True
    else:
        return True

s = input()
n = len(s)

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

Submission status: Wrong Answer

Solution code:
def is_palindrome(s):
    if len(s) > 2:
        i = 0
        n = len(s)-1
        while s[i] == s[n]:
            i += 1
            n -= 1
            if i >= n:
                break
        else:
            return False
        return True
    else:
        return True

s = input()
n = len(s)

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

Submission status: Wrong Answer

Solution code:
s=input()
reverse_s=s[::-1]
n=len(s)
s2=s[:(n-1)//2]
reverse_s2=s2[::-1]
s3=s[(n+3)//2+1:]
reverse_s3=s3[::-1]

if reverse_s==s and reverse_s2==s2 and reverse_s3==s3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()

    n = len(s)
    left = s[0:(n-1)//2]
    right = s[(n+3)//2-1:n]

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

    flag = False
    flag = is_palindrome(left)
    flag = is_palindrome(right)
    flag = is_palindrome(s)

    print('Yes' if flag else 'No')
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()

    n = len(s)
    left = s[0:(n-1)//2]
    right = s[(n+3)//2-1:n]

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

    flag = False
    flag = is_palindrome(s)
    flag = is_palindrome(left)
    flag = is_palindrome(right)

    print('Yes' if flag else 'No')
resolve()

Submission status: Wrong Answer

Solution code:
a=input()
#b=reversed(a)
c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
#d=reversed(a[int((len(a)+3)/2)-1:])
d=''.join(list(reversed(a[int((len(a)+3)/2)-1:])))
print(a,b,c,d)

if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
from collections import deque
s = input()
s = [s_ for s_ in s]
ls = s[:(len(s)//2)]
rs = s[(len(s)//2)+1:]

if len(ls)%2:
    ls.pop(len(ls)//2)
if len(rs)%2:
    rs.pop(len(ls)//2)
ls = deque(ls)

lflg = True
while(len(ls)>0):
    l = ls.popleft()
    r = ls.pop()
    if l != r:
        lflg = False
        break

rs = deque(rs)
rflg = True
while(len(rs)>0):
    l = rs.popleft()
    r = rs.pop()
    if l != r:
        rflg = False
        break

if rflg and lflg:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from collections import deque
s = input()
s = [s_ for s_ in s]
ls = s[:(len(s)//2)]
rs = s[(len(s)//2)+1:]

if len(ls)%2:
    ls.pop(len(ls)//2)
if len(rs)%2:
    rs.pop(len(ls)//2)
ls = deque(ls)
lflg = False
while(len(ls)>0):
    l = ls.popleft()
    r = ls.pop()
    if l != r:
        lflg = True
        break

rs = deque(rs)
rflg = False
while(len(rs)>0):
    l = rs.popleft()
    r = rs.pop()
    if l != r:
        rflg = True
        break

if rflg or lflg:
    print("No")
elif rflg == False and lflg == False:
    print("Yes")

Submission status: Wrong Answer

Solution code:
from collections import deque
s = input()
s = [s_ for s_ in s]
ls = s[:(len(s)//2)]
rs = s[(len(s)//2)+1:]

if len(ls)%2:
    ls.pop(len(ls)//2)
if len(rs)%2:
    rs.pop(len(ls)//2)
ls = deque(ls)
lflg = False
while(len(ls)>0):
    l = ls.popleft()
    r = ls.pop()
    if l != r:
        flg = True
        break

rs = deque(rs)
rflg = False
while(len(rs)>0):
    l = rs.popleft()
    r = rs.pop()
    if l != r:
        rflg = True
        break

if rflg or lflg:
    print("No")
elif rflg == False and lflg == False:
    print("Yes")

Submission status: Wrong Answer

Solution code:
from collections import deque
s = input()
s = [s_ for s_ in s]
ls = s[:(len(s)//2)]
rs = s[(len(s)//2)+1:]

if len(ls)%2:
    ls.pop(len(ls)//2)
if len(rs)%2:
    rs.pop(len(ls)//2)
ls = deque(ls)
lflg = False
while(len(ls)>0):
    l = ls.popleft()
    r = ls.pop()
    if l != r:
        flg = True
        break

rs = deque(rs)
rflg = False
while(rs):
    l = rs.popleft()
    r = rs.pop()
    if l != r:
        rflg = True
        break

if rflg or lflg:
    print("No")
elif rflg == False and lflg == False:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()

m = []
for i in s:
  m.append(i)
n = len(s)
n1 = int((n-1)/2)
n2 = int((n+3)/2)
ans = 0

for i in range(n1):
  if m[i] != m[n-1-i]:
    print('No')
    break
  else:
    if m[i] != m[n1-1-i]:
      print('No')
      break
    else:
      if m[n2-1+i] != m[n-1-i]:
        print('No')
        break
      else:
        ans += 1
        
if ans == 3:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

m = []
for i in s:
  m.append(i)
n = len(s)
n1 = int((n-1)/2)
n2 = int((n+3)/2)

for i in range(n1):
  if m[i] != m[n-1-i]:
    print('No')
    break
  else:
    if m[i] != m[n1-1-i]:
      print('No')
      break
    else:
      if m[n2-1+i] != m[n-1-i]:
        print('No')
        break
      else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)
m = []
for i in s:
  m.append(i)

n1 = int((n-1)/2)
n2 = int((n+3)/2)
for i in range(n1):
  if m[i] != m[n-1-i]:
    print('No')
    break
  else:
    if m[i] != m[n1-1-i]:
      print('No')
      break
    else:
      if m[n2-1] != m[n-1-i]:
        print('No')
        break
      else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

n = len(s)
m = []
for i in s:
  m.append(i)

n1 = int((n-1)/2)
n2 = int((n+3)/2)
for i in range(n):
  if m[i] != m[n-1-i]:
    print('No')
    break
  else:
    if m[i] != m[n1-1-i]:
      print('No')
      break
    else:
      if m[n2-1] != m[n-1-i]:
        print('No')
        break
      else:
        print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ng_list = [4*i+1 for i in range(1,25)]
i = 0
 
county = 0
if n == 3:
    if s[0] == s[2]:
        print("Yes")
    else:
        print("No")
else:
    for i in range(int((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i] or s[int((n-1)/2)-1-i] != s[int((n+3)/2-1+i)]:
            print("No")
            break
        else:
            county += 1
    if county == int((n-1)/4):
        print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
import math
i = 0

county = 0
if n == 3:
    if s[0] == s[2]:
        print("Yes")
    else:
        print("No")
else:
    for i in range(math.ceil((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i] or s[int((n-1)/2)-1-i] == s[int((n+3)/2-1+i)]:
            print("No")
            break
        else:
            county += 1
    if county == math.ceil((n-1)/4):
        print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ng_list = [4*i+1 for i in range(1,25)]
i = 0

county = 0
if n == 3:
    if s[0] == s[2]:
        print("Yes")
    else:
        print("No")
else:
    for i in range(int((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
            print("No")
            break
        else:
            county += 1
    if county == int((n-1)/4):
        print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ng_list = [4*i+1 for i in range(1,25)]
i = 0

if n in ng_list:
    print("No")
else:
    county = 0
    if n == 3:
        if s[0] == s[2]:
            print("Yes")
        else:
            print("No")
    else:
        for i in range(int((n-1)/4)):
            if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
                print("No")
                break
            else:
                county += 1
        if county == int((n-1)/4):
            print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
print(n)
ng_list = [4*i+1 for i in range(1,25)]
print(ng_list)
i = 0

if n in ng_list:
    print("No")
else:
    county = 0
    if n == 3:
        if s[0] == s[2]:
            print("Yes")
        else:
            print("No")
    else:
        for i in range(int((n-1)/4)):
            if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
                print("No")
                break
            else:
                county += 1
        if county == int((n-1)/4):
            print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
ng_list = [4*i+1 for i in range(1,25)]
i = 0

if n in ng_list:
    print("No")
else:
    county = 0
    for i in range(int((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
            print("No")
            break
        else:
            county += 1
    if county == int((n-1)/4):
        print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB_num = int((N+3)/2)
SB = S[SB_num-1:]
SB_rev = SB[::-1]

if SF == SB_rev:
    if SF == SF_rev:
        if SB == SB_rev:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB = S[SF_num-1:]
SB_rev = SB[::-1]

if SF == SB_rev:
    if SF == SF_rev:
        if SB == SB_rev:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB = S[:SF_num-1]
SB_rev = SB[::-1]

if SF == SB_rev:
    if SF == SF_rev:
        if SB == SB_rev:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
SF_num = int((N-1)/2)
SF = S[:SF_num]
SF_rev = SF[::-1]
SB = S[-SF_num:]
SB_rev = SB[::-1]

if SF == SB_rev:
    if SF[:SF_num] == SF_rev[:SF_num]:
        if SB[-SF_num:] == SB_rev[-SF_num:]:
            print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
#s = 'bakasakab'
x = len(s)

ck = 1
for i in range(x//2):
  if not s[i] == s[x-i-1]:
    ck = 0
    break

if ck:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=input()
a=s[:len(s)//2]
b=s[(len(s)//2)+1:]
if a!=b:
  print('No')
elif a==reversed(a) and b==reversed(b):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

flag = 1

def check(s):
    return s == s[::-1]
    
if not check(s):
    flag = 0
    
if not check(s[:len(s)//2]):
    ans = 0
    
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
 
flag = 0
 
if S == S[::-1]:
    flag = 1
else:
    flag = 0
 
tmp = int((N-1)/2)
a = S[:tmp]

if a == a[::-1]:
    flag = 1
else:
    flag = 0
 
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

flag = 0

if S == S[::-1]:
    flag = 1
else:
    flag = 0

tmp = int((N-1)/2)
a = S[:tmp]


if a == a[::-1]:
    flag = 1
else:
    flag = 0

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

if b == b[::-1]:
    flag = 1
else:
    flag = 0

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

Submission status: Wrong Answer

Solution code:
import math
s = str(input())
m = (len(s) - 1) / 2
c = True
for i in range(math.floor(m / 2)):
    if s[i] != s[int(m-1-i)]:
        c = False
for i in range(math.floor(m / 2)):
    if s[int(m+1+i)] != s[int(len(s)-1-i)]:
        c = False
for i in range(math.floor(m)):
    if s[i] != s[int(math.floor(len(s)-1))]:
        c = False
if c:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
s = str(input())
m = (len(s) - 1) / 2
c = True
for i in range(math.floor(m / 2)):
    if s[i] != s[int(m-1-i)]:
        c = False
for i in range(math.floor(m / 2)):
    if s[int(m+1+i)] != s[int(len(s)-1-i)]:
        c = False
if c:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

def is_kaibun(st):
    return st[:len(st) // 2] == st[-(len(st) // 2):][::-1]

if is_kaibun(s) and is_kaibun(s[:len(s) // 2]) and is_kaibun(s[-(len(s) // 2):][::-1]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())

thresh_1 = int((len(s) - 1) / 2)
thresh_2 = int((len(s) + 3) / 2)

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a=S[0:int((N-1)/2)]
b=S[int((N+3)/2-1):int((N))]

c=list(a)
d=sorted(c,reverse=True)

e=list(b)
f=sorted(e,reverse=True)

if a==b and c==d and e==f:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
a=S[0:int((N-1)/2)]
b=S[int((N+3)/2-1):int((N))]

c=list(a)
m=len(c)
l=S[0:int((m-1)/2)]
p=S[int((m+3)/2-1):int((m))]

d=list(b)
k=len(d)
q=S[0:int((k-1)/2)]
w=S[int((k+3)/2-1):int((k))]

if a==b and l==p and q==w:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()

n=len(s)

a=s[::-1]
print(a)

mae=(a[0:int((n-1)/2)])
print(mae)

maer=(mae[::-1])
print(maer)

ato=(a[int((n+2)/2):])
print(ato)

ator=(ato[::-1])
print(ator)

if a==s :
    if mae==maer and ato==ator:
        print("Yes")
    else :
        print("No")
        

else :
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
left = S[:int(N/2)]
right = S[int((N+2)/2):]
left_reversed = "".join(reversed(list(left)))
right_reversed = "".join(reversed(list(right)))

if left == left_reversed and right == right_reversed:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

S = input()
n = len(S)

f = 0

if S == S[::-1]:
    L = S[:int((n-1)/2)]
    R = S[int((n+1)/2):]
    if len(L) == 1:
        f == 1
    elif L == L[::-1] and R == R[::-1]:
        f = 1
if f ==0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

S = input()
n = len(S)

f = 0

if S == S[::-1]:
    L = S[:int((n-1)/2)]
    R = S[int((n+1)/2):]
    if len(L) == 1:
        print('Yes')
        f == 1
    elif L == L[::-1]:
        if R == R[::-1]:
            print('Yes')
            f = 1
if f ==0:
    print('No')

Submission status: Wrong Answer

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

S = input()
n = len(S)

f = 0

if S == S[::-1]:
    L = S[:int((n-1)/2)]
    R = S[int((n+1)/2):]
    if len(L) == 1:
        print('Yes')
        f == 1
    elif L == L[::-1] and R == R[::-1]:
        print('Yes')
        f = 1
if f ==0:
    print('No')

Submission status: Wrong Answer

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

S = input()
n = len(S)

f = 0

if S == S[::-1]:
    L = S[:int((n-1)/2)]
    R = S[int((n+1)/2):]
    if len(L) == 1:
        print('Yes')
    elif L == L[::-1] and R == R[::-1]:
        print('Yes')
        f = 1
if f ==0:
    print('No')

Submission status: Wrong Answer

Solution code:
st=input()
n=len(st)
if(n%2==0):
	print("No")
	exit(0)
if(st==st[::-1]):
	s1=""
	for i in range((n-1)//2+1):
		s1+=st[i]
	s2=""
	for i in range((n+3)//2,n):
		s2+=st[i]
	if(s1==s1[::-1] and s2==s2[::-1]):
		print("Yes")
	else:
		print("No")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
st=input()
n=len(st)
if(st==st[::-1]):
	s1=""
	for i in range((n-1)//2):
		s1+=st[i]
	s2=""
	for i in range((n+3)//2,n):
		s2+=st[i]
	if(s1==s1[::-1] and s2==s2[::-1]):
		print("Yes")
	else:
		print("No")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
def isPalindrome(s): 
    return s == s[::-1] 
s=input()
e=1
r=len(s)//2
e1=(len(s)+3)//2
r1=len(s)
if isPalindrome((s[e-1:r]))==False or isPalindrome((s[e1-1:r1]))==False:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def isPalindrome(s): 
    return s == s[::-1] 
s=input()
e=1
r=len(s)//2
e1=(len(s)+3)//2
r1=len(s)
if isPalindrome((s[e-1:r]))==False:
    print("No")
elif isPalindrome((s[e1-1:r1]))==False:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = list(input())
n = len(s)
l1 = int((n-1)/2)
l2 = int((n+3)/2)-1
s1 = s[0:l1]
s2 = s[l2:n]
t1 = s == s.reverse()
t2 = s1 == s1.reverse()
t3 = s2 == s2.reverse()
if (t1 and t2 and t3):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#B
def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 <= p2:
        if s[p1] != s[p2]:
            flag = False
        p1 += 1
        p2 += -1
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    print(s, s1, s2)
    print(isReverse(s), isReverse(s1), isReverse(s2))
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
#B
def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 >= p2:
        if s[p1] != s[p2]:
            flag = False
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
#B
def isReverse(s):
    p1 = 0
    p2 = len(s) - 1
    flag = True
    while p1 == p2:
        if s[p1] != s[p2]:
            flag = False
    return flag
if __name__ == "__main__":
    s = input()
    s1 = s[:int((len(s) - 1) / 2)]
    s2 = s[int((len(s) + 1) / 2):]
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B
s = input()
c = int((len(s) - 1) / 2 - 1)
f1 = 0
f11 = True
for i in range(int((len(s) - 1) / 2)):
    if s[i] == s[c]:
        f1 += 1
    else:
        f11 = False
    c += -1
c = len(s) - 1
f2 = 0
f12 = True
for i in range(int((len(s) + 1) / 2), len(s)):
    if s[i] == s[c]:
        f2 += 1
    else:
        f12 = False
    c += -1
if f11 and f12:#f1 == (len(s) - 1) / 2 and f2 == (len(s) - 1) / 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
c = int((len(s) - 1) / 2 - 1)
f1 = 0
for i in range(int((len(s) - 1) / 2)):
    if s[i] == s[c]:
        f1 += 1
    else:
        break
    c += -1
c = len(s) - 1
f2 = 0
for i in range(int((len(s) + 1) / 2), len(s)):
    if s[i] == s[c]:
        f2 += 1
    else:
        break
    c += -1
if f1 == (len(s) - 1) / 2 and f2 == (len(s) - 1) / 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

def solve(word, length):

    first = (length-1) // 2
    last = (length+3) // 2

    if isPalindrome(s[:first]) and isPalindrome(s[last-1:]):
        print("Yes")
    else:
        print("No")

def isPalindrome(word):
    palindrome = True
    size = len(word)
    start = 0
    end = size - 1

    while start < end:
        if word[start] != word[end]:
            palindrome = False
            return palindrome
        
        start += 1
        end -= 1
    
    return palindrome

solve(s, length)

Submission status: Wrong Answer

Solution code:
S = list(input())
list1 = S[0:int(((len(S)-1)/2))]
list2 = S[int(((len(S)+3)/2)-1):len(S)]
list1_r = list(reversed(list1))
list2_r = list(reversed(list2))

if list1 == list1_r and list2 == list2_r:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
list1 = S[0:int(((len(S)-1)/2))]
list2 = S[int(((len(S)+3)/2)-1):len(S)]
list1_r = list(reversed(list1))
list2_r = list(reversed(list2))

if len(list1)%2 != 0 and list1 == list1_r and len(list2)%2 != 0 and list2 == list2_r:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
list1 = S[0:int(((len(S)-1)/2))]
list2 = S[int(((len(S)+3)/2)-1):len(S)]
list1_r = list(reversed(list1))
list2_r = list(reversed(list2))

if len(list1)>=3 and list1 == list1_r and len(list2)>=3 and list2 == list2_r:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
list1 = S[0:int(((len(S)-1)/2))]
list2 = S[int(((len(S)+3)/2)-1):len(S)]
list1_r = list(reversed(list1))
list2_r = list(reversed(list2))

if len(list1)>=3 and list1 == list1_r and len(list2)>=3 and list2 == list2_r:
     print("Yes")
else:
     print("No")

Submission status: Wrong Answer

Solution code:
def palindrome(s):
    return s == "".join(list(reversed(s)))

S = input()
N = len(S)

s1 = S[:(N-1)//2]
s2 = S[(N+1)//2:]
print("Yes" if palindrome(s1) and palindrome(s2) else "No")

Submission status: Wrong Answer

Solution code:
def palindrome(s):
    return s == "".join(list(reversed(s)))

S = input()
N = len(S)


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

Submission status: Wrong Answer

Solution code:
def palindrome(s):
    return s == reversed(s)

S = input()
N = len(S)

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

Submission status: Wrong Answer

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

S = input()
N = len(S)

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

Submission status: Wrong Answer

Solution code:
s = input()
s_h = s[:(len(s)-1)//2]
print(s_h)
s_h_b = s[(len(s)+3)//2-1:]
print(s_h_b)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

S = np.array([i for i in input()])
S_rev = S[::-1]
N = len(S)

ans = 'No'

if all(S == S_rev):
  temp_S = S[:(N-1)//2+1]
  temp_S_rev = temp_S[::-1]
  
  if all(temp_S == temp_S_rev):
    temp_S = S[(N+3)//2:]
    temp_S_rev = temp_S[::-1]
    
    if all(temp_S == temp_S_rev):
      ans = 'Yes'
print(ans)