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: Runtime Error

Solution code:
a = input()
l = len(a)
s = list(a)
for i in range(len(s)):
  if s[i] != s[len(s)-i]:
    print("NO")
    exit()

for i in range((len(s)-1)/2):
  if s[i] != s[(len(s)-1)/2-i]:
    print("NO")
    exit()
    
for i in range((l+3)/2 , l):
  if s[i] != s[len(s)-i]:
    print("NO")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
a = input()
l = len(a)
s = list(a)
for i in range(len(s)):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()

for i in range((len(s)-1)/2):
  if s[i] /= s[(len(s)-1)/2-i]:
    print("NO")
    exit()
    
for i in range((l+3)/2 , l):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
l = len(s)
for i in range(len(s)):
  if s[i] /= s[len(s)-i-1]:
    print("NO")
    exit()

for i in range((len(s)-1)/2):
  if s[i] /= s[(len(s)-1)/2-i-1]:
    print("NO")
    exit()
    
for i in range((l+3)/2 , l):
  if s[i] /= s[len(s)-i-1]:
    print("NO")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
l = len(s)
for i in range(len(s)):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()

for i in range((len(s)-1)/2):
  if s[i] /= s[(len(s)-1)/2-i]:
    print("NO")
    exit()
    
for i in range((l+3)/2 , l):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
l = len(s)
for i in range(len(s)):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()

for i in range((len(s)-1)/2):
  if s[i] /= s[(len(s)-1)/2-i]:
    print("NO")
    exit()
    
for i in range((l+3)/2 , l):
  if s[i] /= s[len(s)-i]:
    print("NO")
    exit()

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
s1 = s[0:n/2-1]
s2 = s[n/2+1:n-1]
if s != ''.join(reversed(s)):
    print('No')
elif s1 != ''.join(reversed(s)):
    print('No')
elif s2 != ''.join(reversed(s)):
    print('No')
else print('Yes')

Submission status: Runtime Error

Solution code:
sente=input()
n=len(sente)
nt=int((n-1)/2)
nb=int((n+3)/2)
#print(nt,nb)
#print(sente[nb:n])
if sente == sente[::-1]:
    if sente[0:nt] == sente[0:nt][::-1]:
        #print(sente[0:nt])
       
        if sente[nb-1:n]==sente[nb-1:n][::-1]:
            #print(sente[nb-1:n])

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

Submission status: Runtime Error

Solution code:
N = int(input())
s = str(N)
n = 0
for i in s:
  n += int(i)
  
if N%n==0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
S = input()

num = len(S)
S1 = S[:(num-1)/2]
S2 = S[(num+3)/2:]

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

num = len(S)
S1 = S[:(num-1)/2]
S2 = S[(num+3)/2:]

if S == S[::-1] and S1 == [::-1] and S2 == [::-1]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
list = input().split()
n = len(list)

mae = list[m for m < n/2 ]

ushiro = list[m for m > n/2 ]

ema = mae[n/2 - p for p < n/2 ]

oroshi = ushiro[-n/2 + p for p > n/2 ]

if mae = ema and ushiro = oroshi:
  print(Yes)
  
else:
  print(No)

Submission status: Runtime Error

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

if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
        ans = 'Yes'
    else:
        ans = 'No'
else:
    ans = 'No'

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 入力
s = input()

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

if kaibun(s):
  s_half = s[:(len(s)-1)//2]
  if kaibun(s_half):
    ans = 'Yes'
  else:
    ans = 'No'
else:
  ans = 'No'

# 出力
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

s = input()
len_s = len(s)
if s[:int((len_ s -1 ) /2)] != s[int((len_ s -1 ) / 2 +1):]:
    print('No')
else:
    tmp = s[:int((len_ s -1 ) /2)]
    if len(tmp) == 1:
        print('Yes')
    else:
        if len(tmp ) %2 == 1:
            if tmp[:int((len(tmp) - 1) / 2)] == tmp[int((len(tmp) - 1) / 2 + 1):][::-1]:
                print('Yes')
            else:
                print('No')
        else:
            if tmp[:int(len(tmp) / 2)] == tmp[int(len(tmp) / 2):][::-1]:
                print('Yes')
            else:
                print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        break;
if answer == "Yes":
    for i in range(int(strongn1/2)):
        if kaibun[i] == kaibun[strongn1-i-1]:
            answer = "Yes"
        else:
            answer="No"
            break;
if answer =="Yes":
    for i in reversed(range(strongn2,n,int(strongn1/2))):
        if kaibun[i] == kaibun[strongn2-2-i+n]:
            answer = "Yes"
        else:
            answer = "No"

print(answer)

Submission status: Runtime Error

Solution code:
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i-1]:
        answer = "Yes"
    else:
        answer="No"
        print(answer)
        sys.exit()
for i in reversed(range(strongn2,n,int(strongn1/2))):
    if kaibun[i] == kaibun[strongn2-2-i+n]:
        answer = "Yes"
    else:
        answer = "No"
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
s=input()
s_pre = s[:(n-1)//2]
s_epi = s[(n+1)//2:]
n = len(s)
if s != s[::-1]:
    print('No')
    sys.exit()
if s_pre != s_pre[::-1]:
    print('No')
    sys.exit()
if s_epi != s_epi[::-1]:
    print('No')
    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
input_str = input().strip()

def main():
  N = len(input_str)
  input_str_part1 = input_str[:int((N-1)/2)]
  input_str_part2 = input_str[int((N+3)/2)-1:]
  flag0 = input_str == input_str[::-1]
  flag1 = input_str_part1 == input_str_part1[::-1]
  flag2 = input_str_part2 == input_str_part2[::-1]
  if flag0 * flag1 * flag2:
    print("Yes")
  else:
	print("No")
  return

if __name__ == "__main__":
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S=list(input())
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
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("")
s1 = s[0:(n-1)/2]
s2 = s[(n+3)/2-1:]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
def kaibun_check(bun):
    if bun == bun[::-1]
        return True
    else:
        return False
if kaibun_check(S):
    if kaibun_check(S[:len(S)/2]):
        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:
    a_a = a[:len(a) // 2]
    a_b = a[len(a) // 2 + 1]
    if a_a == a_b:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def kaibun(s):
  n=len(s)
  a=True
  if n%2==0:
    for i in range(n/2):
      if s[i]!=s[n-1-i]:
        a=False
  else:
    for i in range((n-1)/2):
      if s[i]!=s[n-1-i]:
        a=False
  return a
if kaibun(S)==True and kaibun(S[0:(len(S)-1)/2])==True and kaibun(S[(len(S)+3)/2-1:len(S)])==True:
  return "Yes"
else:
  return "No"

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define rep(i, n) for(ll (i)=0;(i)<(n);(i)++)

bool is(string s, int i, int j) {
    for (int l = 0; l <= j - i; l++) {
        if (s[l + i] != s[j - l]) {
            return false;
        }
    }
    return true;
}

int main() {
    string s;
    cin >> s;
    int n;
    n = s.size();
    if (is(s, 0, (n - 1) / 2 - 1) && is(s, 0, n - 1) && is(s, (n + 3) / 2 - 1, n - 1)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
s = list(input())
n = len(s)
ans = "No"

for i in range(1 - -(n//2)//2):
    if s[i] == s[n//2 - i - 1] == s[n//2 + i + 1] == s[n - i - 1]:
        ans = "Yes"
    else:
        print("No")
        exit()

print(ans)

Submission status: Runtime Error

Solution code:
def isP():
    return S == S[::-1]

S = input()
if isP(S) == False:
    print("No")
if isP(S[:len(S) // 2]) == False:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
s = input()

y = s[len(s) // 2]


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

    str(s_list)
    s_list = s[x:]
except NameError:
    print("Yes")
    exit()

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

Submission status: Runtime Error

Solution code:
s = input()

y = s[len(s) // 2]


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

    str(s_list)
    s_list = s[x:]
except NameError:
    print("yes")
    exit()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
aaa

Submission status: Runtime Error

Solution code:
s = input()
for i in s:
    if s.count(i) == 1:
        y = i

s_list = s.split(y)
s_list.pop(1)

for u in s:
    if s.count(u) == 1:
        x = u

str(s_list)
s_list = s.split(x)
if s_list[0] == s_list[1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def main():
  h,*s=open(0)
  h,w,k=map(int,h.split())
  s=[list(map(int,t[:w]))for t in s]
  m=9e9
  for i in range(1<<h-1):
    t,v,l=[],0,1
    for j in range(h):
      if i>>j&1:
        t+=j+1,
        l+=1
    t+=h,
    c=[0]*l
    for i in range(w):
      b=f=g=0
      u=[]
      for j,x in enumerate(t):
        d,b=sum(s[j][i]for j in range(b,x)),x
        u+=d,
        if d>k:
          g=1
          break
        c[j]+=d
        f|=c[j]>k
      else:
        if f:
          c=u
          v+=1
      if g:break
    else:
      if v+l-1<m:m=v+l-1
  print(m)
main()

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
judg = 0
n = N - 1 
for i in range(0,n):
  if S[i] == S[n - i]:
    judg += 0
  else:
    judg += 1

for i in range(0,n/2-1):
  if S[i] == S[n/2 - i]:
    judg += 0
  else:
    judg += 1

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

Submission status: Runtime Error

Solution code:
print(int(input())**3/27)

Submission status: Runtime Error

Solution code:
S = input()
def kaibun(st):
    stre = st[::-1]
    if st == stre:
        return 1
    else:
        return 0

if kaibun(S[0:(len(S)-1) // 2]) and kaibun(S) and kaibun(S[(len(S)+3) // 2]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def isp(s):
  k = s[::-1]
  return s == k
s = input()
l = len(s)
if isp(s) and isp(s[0:(l-1)/2]) and isp(s[(l+3)/2-1:l]):
  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-1-i]:
        print("No")
        exit()
harf=int((n-1)/2
for i in range(harf):
    if s[i]!=s[harf-1-i]:
        print("No")
        exit()
for i in range(harf+1,n):
    if s[i]!=s[n-1-(i-harf-1)]:
        print("No")
        exit()
print("Yes")

Submission status: Runtime Error

Solution code:

# 回分判定
def palind(LIST, N):
    for i in range(N):
        if LIST[i] != LIST[-1-i]:
            return False
    return True
​
S = list(input())
# front: Sの前半, rear: Sの後半
front = S[:((len(S)-1)//2)]
# Sおよびfrontが回分であれば真 (frontが回分ならば、rearも回分であることは自明)
if palind(S, len(S)) and palind(front, len(front)):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
S = input()
n = len(S)
isKaibun = True
for i in range(n//2):
    if(S[i] != S[n-i-1] or S[i] != S[n//2-i-1] or S[n//2+i+a1] != S[n//2-i-1]):
        isKaibun = False
        break
if(isKaibun):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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:])):
    if(check(2)):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
     print('No')

Submission status: Runtime Error

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:])):
    if(check(2)):
    	print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
     print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
def kaibun(s,n):
    for i in range(n//2):
        if(s[i]!=s[n-i-1]):
            return false
    return true

if(kaibun(S,N) & kaibun(S[0:(N+1)//2-1],N//2) & kaibun(S[N:(N+3)//2-2:-1],N//2)):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
sel='B'
#A
if sel=='A':
    N,M=map(int,input().split())
    ans=0
    ans+=M*(M-1)//2
    ans+=N*(N-1)//2
    print(ans)

#B
if sel=='B':
    def ispal(s):
        for i in range(len(s)//2+1):
            if s[i]!=s[-(i+1)]:
                return False
        return True

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

#C
if sel=='C':
    L=int(input())
    print((L**3)/27)

#D
if sel=='D':    
    N=int(input())
    A=[int(i) for i in input().split()]
    kin=list(set(A))
    cnt={}
    for k in kin:
        cnt[k]=0
    for a in A:
        cnt[a]+=1
    SUM=0
    for k in kin:
        SUM+=cnt[k]*(cnt[k]-1)//2
    for a in A:
        if cnt[a]>=2:
            print(SUM-cnt[a]+1)
        else:
            print(SUM)
        
#E
if sel=='E':
    a=0

#F
if sel=='F':
    N,S=map(int,input().split())
    A=[int(i) for i in input().split()]

    for l in range(N):
        for r in range(l,N):
            print(tab[l][r])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def check(s: str):
    return s == s[::-1]


s = input()
if check(s) and check(s[:(n-1)//2]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
half = int((N - 1)/2)
half_half = int((half - 1)/2)
count = 0
total = 2*half_half +half
for i in range(half):
  if S[i] == S[-1-i]:
    count += 1
  else:
    pass
for j in range(half_half):
  if S[j] == S[half_half-1-j]:
    count += 1
  else:
    pass
  if S[-1-j] == S[-half_half+j]
    count += 1
  else:
    pass
if count ==

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
c1 = int((N-1)/2)
c2 = int((N+3)/2)
f = 0

if N < 5:
    f = 1

if c1 % 2 == 0:
    for i in range(int(c1/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for p in range(int(N/2)):
        if S[p] != S[N-p-1]:
            f=1
            break
        
else:
    for i in range(int((c1-1)/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for q in range(int((N-1)/2)):
        if S[p] != S[N-p-1]:
            f=1
            break

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

Submission status: Runtime Error

Solution code:
k = input().split()
K = list(k[0])

if len(K) == 3:
  if K[0] == K[2]:
    print(Yes)
  else:
    print(No)
    
elif len(K) == 5:
  if K[0] == K[4] and K[1] == K[3] and K[0] == K[1] and K[3] == K[4]:
    print(Yes)
  else:
    print(No)
    
elif len(K) == 2:
  if K[0] == K[1]:
    print(Yes)
  else:
    print(No)
    
elif len(K) == 4:
  if K[0] == K[3] and K[1] == K[2] and K[0] == K[1] and K[2] == K[3]:
    print(Yes)
  else:
    print(No)

elif len(K)%2 != 0:
  a = 0
  for i in range(int((len(K)-1)/2)):
    if K[i] == K[len(K)-1 - i]:
      a = a + 1
      
  if int((len(K)-1)/2)%2 != 0:    
    b = 0    
    for i in range(int(((len(K)-1)/2)-1)/2):
      if K[i] == K[int((len(K)-1)/2) - i]:
        b = b + 1
    
    c = 0
    for i in range(int(((len(K)-1)/2)-1)/2):
      if K[i + int(len(K+1)/2)] == K[int(len(K)) - i]:
        c = c + 1
      
    if a = int((len(K)-1)/2) and b = 

else:
  a = 0
  for i in range(int(len(K)/2)):
    if K[i] == K[len(K)-1 - i]:
      a = a + 1
  b = 0    
  for i in range(int(((len(K)-1)/2)-1)/2):
    if K[i] == K[int((len(K)-1)/2) - i]:
      b = b + 1
    
  c = 0
  for i in range(int(((len(K)-1)/2)-1)/2):
    if K[i + int(len(K+1)/2)] == K[int(len(K)) - i]:
      c = c + 1

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
c1 = int((N-1)/2)
c2 = int((N+3)/2)
f = 0

if N < 5:
    f = 1

if c1 % 2 == 0:
    for i in range(int(c1/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for p in range(N/2):
        if S[p] != S[N-p-1]:
            f=1
            break
        
else:
    for i in range(int((c1-1)/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for q in range(int((N-1)/2)):
        if S[p] != S[N-p-1]:
            f=1
            break

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

Submission status: Runtime Error

Solution code:
s = str(input())

def check(text):
    n = len(text)
    if n == 1:
        return True

    left = int((n-1)/2)
    right = int((n+3)/2 - 1)

    print(text[0:left], text[right:n])
    if len(text[0:left]) == len(text[right:n]):
        if text[0:left] == text[right:n] and check(text[0:left]):
            return True
    else:
        if text[0:left] == text[right+1:n] and check(text[0:left]):
            return True
    return False

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

Submission status: Runtime Error

Solution code:
s1=input()
l=len(s1)
h=(l-1)//2
k1=s1[:h]
k2=s1[h+1:]
if k1==k2:
    a=(l-1)//2
    s3=s1[:a]
    if a%2!=0:
        h2=(a-1)//2
        j1=s3[:h2]
        j2=s3[h2+1:]
        if j1==j2:
            b=(l+3)/2
            b2=l-b+1
            s4=s1[:b2]
            h3=(b2-1)//2
            f1=s3[:h3]
            f2=s3[h3+1:]
            if f1==f2:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        h2=a/2
        j1=s3[:h2]
        j2=s3[h2+1:]
        if j1==j2:
            b=(l+3)/2
            b2=l-b+1
            s4=s1[:b2]
            h3=(b2-1)//2
            f1=s3[:h3]
            f2=s3[h3+1:]
            if f1==f2:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
if N%2==0:
    print("No")
    return 0

def pal(s):
    n=len(s)
    print(n)
    for i in range(n//2):
        print(i)
        if s[i]!=s[n-i-1]:
            return -1
    return 0
    
if pal(S)==-1:
    print("No")
    return 0

if (pal(S[0:(N-1)//2])==-1)or(pal(S[(N+3)//2:N])==-1):
    print("No")
    return 0

print("Yes")
return 0

Submission status: Runtime Error

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]:
            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")
print("No")

Submission status: Runtime Error

Solution code:
a = list(input().split())
a1 = "".join(a)
c1 = "".join(reversed(a1))
a2 = a1[0:((len(a)-1)/2)]
b2 = "".join(reversed(a2))
def b():
    if len(a1) <= 5:
        return 0
    if a1 == c1 and a2 == b2:
        return 1
    else:
        return 0


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

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
c1 = int((N-1)/2)
c2 = int((N+3)/2)
f = 0

if N < 5:
    f = 1

if c1 % 2 == 0:
    for i in range(int(c1/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for p in range(N/2):
        if S[p] != S[N-p-1]:
            f=1
            break
        
else:
    for i in range(int((c1-1)/2)):
        if S[i] != S[c1-1-i] or S[c2-1-i] != S[N-1-i]:
            f = 1
            break
    for q in range((N-1)/2):
        if S[p] != S[N-p-1]:
            f=1
            break

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

Submission status: Runtime Error

Solution code:
s  = input()
a = s[:len(s)/2 -1]
b = s[len(s)+3/2-1:]
flag = 0
if s == s[::-1]:
    if a == a[::-1]:
        if b == b[::-1]:
            flag = 1

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

Submission status: Runtime Error

Solution code:
N=list(str(input()))
a=len(N)
if N[0]==N[(a-1)/2] and N[a]==N[(a+3)/2]:
  print("yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i-1]:
        answer = "Yes"
    else:
    	answer="No"
    	print(answer)
    	sys.exit()
for i in reversed(range(strongn2,n,int((strongn1/2)-1))):
    if kaibun[i] == kaibun[strongn2-2-i+n]:
        answer = "Yes"
    else:
      	answer = "No"
print(answer)

Submission status: Runtime Error

Solution code:
def is_kaibun(x):
    if len(x) >= 3:
        for i in range(len(x)//2):
            if x[i] != x[-i-1]:
                return 'No'
        n = len(x)
        for i in range(n//2):
            x = x[0: (n-1)//2]
            if x[i] != x[-i-1]:
                return 'No'
        n = len(x)
        for i in range(n//2):
            x = x[0: (n-1)//2]
            if x[i] != x[-i-1]:
                return 'No'
    else:
        return 'No'
    return 'Yes'
n = input()
print(is_kaibun(n))

Submission status: Runtime Error

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

s = input()

if kaibun(s):
    if len(s) == 3:
        print('Yes')
    else:
        s = s[:half]
        if kaibun(s):
            print('Yes')
        else:
            print('No')

else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def is_kaibun(x):
    for i in range(len(x)//2):
        if x[i] != x[-i-1]:
            return 'No'
    n = len(x)
    for i in range(n//2):
        x = x[0: (n-1)//2]
        if x[i] != x[-i-1]:
            return 'No'
    n = len(x)
    for i in range(n//2):
        x = x[0: (n-1)//2]
        if x[i] != x[-i-1]:
            return 'No'
    return 'Yes'
n = input()
print(is_kaibun(n))

Submission status: Runtime Error

Solution code:
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i-1]:
        answer = "Yes"
    else:
    	answer="No"
    	print(answer)
    	sys.exit()
for i in reversed(range(strongn2,n,int(strongn1/2))):
    if kaibun[i] == kaibun[strongn2-2-i+n]:
        answer = "Yes"
    else:
      	answer = "No"
print(answer)

Submission status: Runtime Error

Solution code:
import sys
a= str(input())
kaibun = list(a)
n = int(len(kaibun))
answer = "No"
strongn1 = int((n-1)/2)
strongn2 = int((n+3)/2)
for i in reversed(range((int((n+1)/2)),n)):
    if kaibun[i] == kaibun[n-i-1]:
        answer = "Yes"
    else:
        answer = "No"
        print(answer)
        sys.exit()
for i in range(int(strongn1/2)):
    if kaibun[i] == kaibun[strongn1-i-1]:
        answer = "Yes"
    else:
    	answer="No"
    	print(answer)
    	sys.exit()
for i in reversed(range(strongn2,n,int(strongn1/2))):
    print(i)
    print(strongn2-2-i+n)
    if kaibun[i] == kaibun[strongn2-2-i+n]:
        answer = "Yes"
    else:
      	answer = "No"
print(answer)

Submission status: Runtime Error

Solution code:
b = s[:m]

for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
m = int((n+3)/2)
b = s[m-1:]
m= len(b)
for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
wholeString = input()
firstSub = wholeString[0:int((len(wholeString)-1)/2)]
secondSub = wholeString[int(((len(wholeString)+3)/2)-1):]

if len(wholeString) % 2 == 0 or len(wholeString) < 3 or len(wholeString) > 99:
  print("No")
if firstSub == firstSub[::-1] and secondSub == secondSub[::-1] and wholString == wholeString[::-1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s = input()
f = 0
a = 0; b = 0; c = 0
if len(s)==3 and s[0]==s[2]:
    print('Yes')
else :
    
    for i in range(len(s)//2):
        if s[i]==s[-1-i]:
            a += 1
        if a == len(s)//2:
            f += 1
    for i in range(len(s)//4):
        if s[i]==s[(len(s)-1)//2-1-i]:
            b += 1
        if b == len(s)//4:
            f += 1
        if s[(len(s)+3)//2-1+i]==s[len(s)-1+i]:
            c += 1
        if c == len(s)//4:
            f += 1
    print('Yes' if f == 3 else 'No')

Submission status: Runtime Error

Solution code:
def ID(string):
    left = 0
    right = len(string)-1
    while left < right:
        if string[left] != string[right]:
            return False
        left += 1
        right -= 1
    return True
if ID(string):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S=str(input())
N=len(S)
X=(int(N)-1)/2
Y=(int(N)+3)/2
T=S[1,X]
U=S[Y,N]
if str(S)==str(S)[::-1] and str(T)==str(T)[::-1] and str(U)==str(U)[::-1]:
  print("Yes")
else:
  print("No")