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: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    s=SI()
    n=len(s)
    if s==s[::-1] and s[:n//2]==s[n//2+1:]:
        print("Yes")
    else:
        print("No")

main()

Submission status: Runtime Error

Solution code:
S=input()
size=len(S)
def palin(S,size):
    for i  in range (size//2):
        if S[i]!=S[-1-i]:
            return False
    return True
if palin(S,size) == True:
    L=S[:size//2]
    R=S[size//2+2]
    if palin(L,size//2) & palin(L,size//2):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Runtime Error

Solution code:
def pal(s):
    rev = ''
    for a in s:
        rev = a + rev
    return s == rev

s = input()
def sub(s):
    if pal(s):
        n = len(s)
        if pal(s[0:(n-1)/2]):
            if pal(s[(n+3)/2:n-1]):
                return True
    return False
if sub(s):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
count=0
count_1=0
count_2=0
for i in range((len(s)-1)//2):
    if s[i]==s[-(i+1)]:
        count+=1
for j in range(len(s[:(len(s)+1)//2])//2):
    if s[:(len(s)+1)//2][j]==s[:(len(s)+1)//2][-(j+1)]:
        count_1+=1
for k in range(len(s[(len(s)+3)//2):])):
    if s[(len(s)+3)//2):][k]==s[(len(s)+3)//2):][-(k+1)]:
        count_2+=1
if count==(len(s)-1)//2 and count_1==len(s[:(len(s)+1)//2])//2 and count_2==len(s[(len(s)+3)//2):]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s=input()
count=0
count_1=0
for i in range((len(s)-1)//2):
    if s[i]==s[-(i+1)]:
        count+=1
for j in range(len(s[:(len(s)+1)//2])//2):
    if s[:(len(s)+1)//2][j]==s[:(len(s)+1)//2][-(j+1)]:
    count_1+=1
if count==(len(s)-1)//2 and count_1==len(s[:(len(s)+1)//2])//2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=0
c=0
d=0
if len(a)=3:
  print("Yes")
else:
  for i in range((len(a)-1)//4):
    if a[i]!=a[int((len(a)//2)-i)]:
      c=c+1
    if a[int((len(a)//2)+1+i)]!=a[-i]:
      c=c+1
  if c==0:
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
a=input()
b=0
c=0
d=0
for i in range(len(a)//4):
  if b[i]!=b[(len(a)//2)-i]:
    c=c+1
  if b[(len(a//2)+1+i)]!=b[-i]:
    c=c+1
if c==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

S=input()
if kaibun(S):
  a=S[0:int(len(S)/2)]
  b=S[int(len(S)/2)+1:len(S)]
  if kaibun(a) and kaibun(b):
    print('Yes')
  else:
    print('No')
else:
    print('No')

Submission status: Runtime Error

Solution code:
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

def pall(s,n):
	if s!=s[::-1]:
		return False
	return partpall(s[n//2 +1 :],n) and partpall(s[:n//2 ],n)


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
#n=len(s)
# print(n)
if pall(s,n):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
S = input()

S_list = list(S)
N = len(S_list)
no_flag = 0

for i in range(N//2):
    if S_list[i] != S_list[N-i-1]:
        no_flag = 1

for i in range(int((N-1)/2)//2 -1):
    if S_list[i] != S_list[(N-1)/2-i-1]:
        no_flag = 1

for i in range((N-3)//2-1):
    if S_list[(N+3)//2+i-1] != S_list[N-1-i]:
        no_flag = 1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = str(input())
n = len(s)
ans = "Yes"
j_1 = 0
for i in range((n-1)//2):
  if(s[i]!=s[-1*(i+1)]):
    j_1 += 1
    ans = "No"
    break
if(j_1==0):
  j_2 = 0
  for i in range((n-1)//4):
  if(s[i]!=s[(n-1)//2-i]):
    j_2 += 1
    ans = "No"
    break
  if(j_3 == 0):
    for i in range((n-1)//4):
      if(s[(n+1)//2+i]!=s[n-i-1]):
        j_3 += 1
        ans = "No"
        break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    s = input()
    s1 = s[:int((len(s)-1)/2)]
    s2 = s[int((len(s)+3)/2-1):]
    rs1 = s1[::-1]
    rs2 = s2[::-1]

    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
    
    return
    
main()
a

Submission status: Runtime Error

Solution code:
w = input()
l = len(w)
flag = True
for i in range((l - 1)/2):
  if w[i] != w[l - i - 1]:
    flag = False
    break
mid = (l - 1)/2
mid_mid = mid // 2
for i in range(mid_mid + 1):
  if w[i] != w[mid - i - 1] or not flag:
    flag = False
    break
  if w[i + mid + 1] != w[l - i - 1]:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
f_s = s[0:(n - 1) / 2]
b_s = s[(n + 3) / 2 : n + 1]:

if f_s == b_s:
    if f_s == f_s[::-1]:
        print('Yes')
    else:
        print('No')

else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(str(input()))
double = 0
for i in range((len(s)-1)/2):
  if s[i] = s[len(s)]:
    double += 1
if double == (len(s)-1)/2:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
num=0
if s==s[::-1]:
    num+=1
if s[:(n-1)/2]==s[:(n-1)/2:-1]:
    num+=1
if s[(n+3)/2:n]==s[(n+3)/2:n:-1]:
    num+=1
if num==3:
    print("Yes")
else:
    print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
n=s

if s==reversed(s) and s[0:(n-1)//2]==reverses(s[0:(n-1)//2]) and s[((n+3)//2)-1:n] and reversed(s[((n+3)//2)-1:n]):
print("Yes")

else:
	print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
L=len(S)
ans='No'
for i in S:
    if S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:
    ans='Yes'
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
L=len(S)
ans='No'
for i in S:
    if S==S[::-1] and S[:(L-1)/2+1]==S[(L-1)/2+1::-1] and S[L+3/2:]==S[:(L+3/2)-1:-1]:
    ans='Yes'
print(ans)

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
print(N*(N-1)//2+M*(M-1)//2)

S=input()
T=S[:(len(S)-1)//2-1]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
p=n//2
t=1

for i in range(p):
    if s[i]==s[p-1-i]:
        t=1
    else:
        t=0
        break;

x=1

for i in range(p):
    if s[p+1+i]==s[n-1-i]:
        x=1
   else:
       x=0
       break

y=1

for i in range(n):
    if s[i]==s[n-1-i]:
        y=1
   else:
       y=0
       break

if (t==1 and x==1 and y==1):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
S=input()
t=len(S)
m=t//2
S1=""
S2=""
for x1 in range(m):
  S1 += S[x1]
for x2 in range(m+1,2*m+1):
  S2 += S[x2]
S2=S2[::-1]
if S1==S2:
  t1=len(S1)
  t2=len(S2)
  m1=t1//2
  m2=t2//2
  R11=""
  R12=""
  for y1 in range(m1):
    R11 += S1[y1]
  for y2 in range(m1+1,2*m1+1):
    R12 += S1[y2]
  R12=R12[::-1]
  if R11==R12:
    R21=""
    R22=""
    for z1 in range(m2):
      R21 += S2[z1]
    for z2 in range(m2+1,2*m2+1):
      R22 += S2[z2]
    R22=R22[::-1]
    if R21==R22:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Runtime Error

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

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

if isp(S) and isp(S[0:(N - 1) / 3]):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

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

if (s == s[::-1]
    and len(t) > 0 and len(u) > 0 and
    and t == t[::-1]
    and u == u[::-1]):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S=str(input())
N=len(S)
if S!=S[::-1]:#Sと反転したSが不一致
    print('No')
else:
    S1=S[:(N-1)/2]#Sが1文字目～(N-1)/2番目の場合
    S2=S[(N+3)/2:]#Sが(N+3)/2～N番目の場合
    if S1==S1[::-1] and S2==S2[::-1]:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
def palindrome(S):
  for i in range(len(S)//2):
#    print(S[i],S[-(i+1)])
    if S[i] != S[-(i+1)]:
      return 0
  return 1
ans = "No"
S = input()
S1 = S[:(len(S)-1)//2]
S1 = S[(len(S)+3)//2:]
if palindrome(S) == 1:
  if palindrome(S1) == 1:
    if palindrome(S2) == 1:
      ans == "Yes"
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
string = input()
mid = len(s)//2

gnirts = reversed(string)
print(gnirts)
if(string != gnirts or string[:mid-1] != gnirts[mid+1:] or string[mid+1:] != gnirts[:mid-1]):
  print("No")
  exit()
print("Yes")

Submission status: Runtime Error

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

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

Submission status: Runtime Error

Solution code:
s = input()
c = int((len(s) - 1)/2)
ans = (list(s) == list(reversed(s) and list(s[:c]) == list(reversed(s[:c])) and list(s[(c+1):]) == list(reversed(s[(c+1):])))
print(["No", "Yes"][ans])

Submission status: Runtime Error

Solution code:
s = input()
a = s.sort()
if s != s.sort():
  print('No')
  exit()
  
if s[0:len(s)//2] == a[0:len(s)//2]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
l=int(input())
print((l/3)**3)

Submission status: Runtime Error

Solution code:
for i in range(1,n1+1):
    if s[i-1]!=s[-i] or s1[i-1]!=s1[-i]:
        print('No')
        exit()
print('Yes')

Submission status: Runtime Error

Solution code:
n=len(s)
x=n//2
a=s[0:x]
b=s[x+1:]
if a==b:print('Yes')
else:print('No')

Submission status: Runtime Error

Solution code:
def is_kaibun(st):
  f = True
  for x,y in zip(st, st[::-1]):
    if x != y:
      f = False
      break
  return f

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

Submission status: Runtime Error

Solution code:
s=str(input())
n=len(s)
new_n1=(n-1)/2
new_s1=s[:new_n]

new_n2=(n+3)/2
new_s2=s[new_nw:]

for i in range(new_n1):
 if new_s1[i]!=new_s1[n-i+1]:
    print("No")
    exit()
 else:
  pass

for j in range(new_n2):
 if new_s2[j]!=new_s2[n-j+1]:
    prin("No")
 else
  print("Yes")

Submission status: Runtime Error

Solution code:
n = int(input())
l=[]
for i in range(n): 
    if ((i%3)!=0)  and ((i%5)!=0):
        l.append(i)
print(sum(l))

Submission status: Runtime Error

Solution code:
inp=input()
if inp[2]==inp[3] and inp[4]==inp[5]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
string = input()

def palindrome(inp):
  if inp == inp[::-1]: return True
  else: return False
  
if palindrome(string) and palindrome(string[:int((len(string) + 1)/2)] and palindrome(string[int((len(string) +3)/2):]: print("Yes")
else: print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sa = s[:(n - 1) // 2]
sb = s[(n + 1) // 2:]

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

Submission status: Runtime Error

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

sa = s[:(n-1) // 2]
sb = s[(n + 1) // 2:]

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

Submission status: Runtime Error

Solution code:
s = list(input())
j = -1

for i in range(len() // 2):
    if s[i] != s[j]:
        print('No')
        exit(0)

    j -= 1

print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(['No', 'Yes'][a and b and c])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()

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

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first = s_first_reverse and s_second = s_second_reverse:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
def is_palindrome(s):
    i = 0
    n = len(s)-1
    while s[i] == s[n]:
        i += 1
        n -= 1
        if i >= n:
            break
    else:
        return False
    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: Runtime Error

Solution code:
c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
d=a[int((len(a)+3)/2)-1:]
 
if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
S = input()
Fi = S[:N-1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
Fi = S[:N--1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Submission status: Runtime Error

Solution code:
S = input()
Fi = S[:N--1//2]
Se = S[N+3/2:N+1]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Submission status: Runtime Error

Solution code:
S = input()
Fi = S[:N+1/2]
Se = S[N+3/2:]
SS = S[::-1]
FiFi = Fi[::-1]
SeSe = Se[::-1]
print("Yes" if S == SS and Fi == FiFi and Se == SeSe else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
sl=list(reversed(s))
ns="".join(list(reversed(s)))
k=(len(s)-1)/2
t=s[:k]
tl=list(reversed(t))
nt="".join(list(reversed(t)))
n=(len(s)+3)/2
r=s[n-1:len(s)]
rl=list(reversed(r))
nr="".join(rl)
if s==ns and t==nt and r==nr:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys
S = input()

def isKaibun(txt, n):
    for i in range(n):
        if txt[i] == txt[-(i+1)]:
            continue
        else:
            print("No")
            sys.exit(-1)
    return 0

l = len(S)
isKaibun(S, l//2)

l_b = (l-1)//2 
isKaibun(S[:l_b], l_b//2)

l_a = (l+3)//2
isKaibun(S[l_a-1:], (l-l_a)//2)

print("Yes")

Submission status: Runtime Error

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)-i))]:
        c = False
if c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=list(input().split())
N=len(S)
for i in range(N):
  if S[i]!=S[N-i]:
    print("No")

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
for i in range(N):
  if S[i]!=S[N-1-i] or S[i]!=S[((N-1)/2)-1-i] or S[((N+3)/2)+i]!=S[N-1-i]:
    print("No")
    break

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
for i in range(N):
  if S[i] is not S[N-1-i] or S[i] is not S[((N-1)/2)-1-i] or S[((N+3)/2)+i] is not S[N-1-i]:
    print("No")
    break

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
for i in range(N):
  if S[i]!=S[N-1-i]:
    print("No")
    break
for i in range(N):
  if S[i]!=S[((N-1)/2)-1-i] or S[((N+3)/2)+i]!=S[N-1-i]:
    print("No")
    break

Submission status: Runtime Error

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

S = input()
n = len(S)

f = 0

L = S[:int((n-1)/2)]
R = S[int((n+1)/2):]

if L == R:
    # print(L, R)
    nn = len(L)
    if nn == 1:
        print('Yes')
    elif nn%2==0:
        LL = L[:int(nn/2)]
        LR = L[nn/2:].reverse()
        RL = R[:int(nn/2)]
        RR = R[nn/2:].reverse()
        if LL == LR and RL == RR:
            print('Yes')
            f = 1
    else:
        else:
            LL = L[:int((nn-1)/2)]
            LR = L[int((nn+1)/2):].reverse()
            RL = R[:int((nn-1)/2)]
            RR = R[int((nn+1)/2):].reverse()
            if LL == LR and RL == RR:
                print('Yes')
                f = 1

if f == 0:
    print('No')

Submission status: Runtime Error

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

S = input()
n = len(S)

f = 0

L = S[:int((n-1)/2)]
R = S[int((n+1)/2):]

if L == R:
    # print(L, R)
    nn = len(L)
    if nn%2==0:
        LL = L[:int(nn/2)]
        LR = L[nn/2:]
        RL = R[:int(nn/2)]
        RR = R[nn/2:]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1
    else:
        LL = L[:int((nn-1)/2)]
        LR = L[int((nn+1)/2):]
        RL = R[:int((nn-1)/2)]
        RR = R[int((nn+1)/2):]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1

if f == 0:
    print('No')

Submission status: Runtime Error

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

S = input()
n = len(S)

f = 0

L = S[:int((n-1)/2)]
R = S[int((n+1)/2):]

if L == R:
    # print(L, R)
    nn = len(L)
    if nn%2==0:
        LL = L[:int(nn/2-1)]
        LR = L[n/2:]
        RL = R[:int(nn/2-1)]
        RR = R[n/2:]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1
    else:
        LL = L[:int((nn-1)/2)]
        LR = L[int((nn+1)/2):]
        RL = R[:int((nn-1)/2)]
        RR = R[int((nn+1)/2):]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1

if f == 0:
    print('No')

Submission status: Runtime Error

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

S = input()
n = len(S)

f = 0

L = S[:int((n-1)/2)]
R = S[int((n+3)/2-1):]

if L == R:
    # print(L, R)
    nn = len(L)
    if nn%2==0:
        LL = L[:int(nn/2-1)]
        LR = L[n/2:]
        RL = R[:int(nn/2-1)]
        RR = R[n/2:]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1
    else:
        LL = L[:int((nn-1)/2)]
        LR = L[int((nn+3)/2-1):]
        RL = R[:int((nn-1)/2)]
        RR = R[int((nn+3)/2-1):]
        if LL == LR and RL == RR:
            print('Yes')
            f = 1

if f == 0:
    print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

s = input()
s_former = s[:(len(s) - 1) // 2]
s_latter = s[(len(s) + 3) // 2 - 1:]
print('Yes' if s == s[::-1] and s_former == s_former[::-1] and s_latter == s_latter[::-1] else 'No')
v

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

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

Submission status: Runtime Error

Solution code:
# -*- coding: <encoding name> -*-

s = input()
s_former = s[:(n - 1) / 2 + 1]
s_latter = s[(n + 3) / 2 + 1:]
print('Yes' if s == s[::-1] and s_former == s_former[::-1] and s_latter == s_latter[::-1])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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):]
    if isReverse(s) and isReverse(s1) and isReverse(s2):
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def is_kaibun(_S):
    if _S[:int((len(_S)-1)/2)]==_S[int((len(_S)+1)/2):][::-1]:
        return True
    else:
        return False

def main():
    _S = S()
    is_tsuyoi1 = is_kaibun(_S)
    is_tsuyoi2 = is_kaibun(_S[:int((len(_S)-1)/2)])
    is_tsuyoi3 = is_kaibun(_S[int((len(_S)+3)/2)])
    print("Yes" if is_tsuyoi1 and is_tsuyoi2 and is_tsuyoi3 else "No")


main()

Submission status: Runtime Error

Solution code:
def main():
    import sys
    input = sys.stdin.buffer.readline
    s = input()
    n = len(s)
    s_l = s[:(n-1)/2]
    s_r = s[(n+3)/2:]
    if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)/2]!=reversed(s[:(n-1)/2]):
    flag=False
if s[(n+3)/2-1:]!=reversed(s[(n+3)/2-1::-1]):
    flag=False
print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
s=input()
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2:-1]:
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1::-1]:
    flag=False
print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
s=input()
a=s
s=a
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
s=str(input())
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
s=input()
flag=True
n=len(s)
if s!=s.reversed():
    flag=False
if s[:(n-1)/2]!=s[:(n-1)/2].reversed():
    flag=False
if s[(n+3)/2-1:]!=s[(n+3)/2-1:].reversed():
    flag=False
print("Yes" if flag else "No")

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
S1 = S[:N//2]
S2 = S[N//2 + 1:]
N1 = len(S1)
if N1 % 2 == 1:
    if S1[N1//2 + 1] != S2[N1//2 + 1]:
        print('No')
        exit()

for i in range(N//4):
    if S1[i] != S2[-i - 1] or S1[i] != S2[i] or S1[i] != S2[-i - 1]:
        print('No')
        exit()
print('Yes')

Submission status: Runtime Error

Solution code:
S=input()
T=S[:N//2]
U=S[N//2+1:]
N=len(S)
flg=0

for i in range(int((N-1)/2)):
  if(S[i]!=S[-i-1]):
    print(S[i],S[-i])
    flg=1
    break
  
for j in range(len(T)//2):
  if(T[j]!=T[-j-1]):
    flg=1
    break
  
for k in range(len(U)//2):
  if(U[k]!=U[-k-1]):
    flg=1
    break

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

Submission status: Runtime Error

Solution code:
S=input()
T=S[:N//2]
U=S[N//2+1:]
N=len(S)
flg=0
for i in range(int((N-1)/2)):
  if(S[i]!=S[-i]):
    break
  flg+=1

for j in range(len(T)//2):
  if(T[j]!=T[-j]):
    break
  flg+=1

for k in range(len(U)//2):
  if(U[k]!=U[-k]):
    break
  flg+=1

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input().strip();	n=len(S)
print("Yes" 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] else "No")

Submission status: Runtime Error

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