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:

s = input()
n = len(s)
s1 = s[:int((n-1)/2)]
s2 = s[int((n+3)/2)-1:]

i = 1
while i < len(s1):
    if not s1[i-1] == s1[-i]:
        print("No")
        break
    i += 1
while i < len(s2):
    if not s2[i+2] == s2[-i]:
        print("No")
    i += 1
print("Yes")

Submission status: Runtime Error

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

mae = S[:(N-1)/2]
ushiro = S[(N+3)/2:]


for i in range(N):
    if S[i] == S[-(i+1)]:
        for j in range(len(mae)):
            if mae[j] != mae[-(j + 1)] or ushiro[j] != ushiro[-(j + 1)]:
                print("No")
                break


            else:
                print("Yes")
                break
        break




    else:
        print("No")
        break

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=list(input())
b=a[:int((n-1)/2)+1]
c=a[int((n+3)/2):]
n=len(a)
anal = a==reversed(a)
manco = b==reversed(b)
portio = c==reversed(c)

if anal and manco and portio:
  print('Yes')
esle:
  print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
As = list(map(int, input().split()))

number_counter = {}
for i in As:
    if str(i) in number_counter:
        number_counter[str(i)] += 1
    else:
        number_counter[str(i)] = 1
# 自分の数字以外の方法の合計は一緒。

howmanyways_in_number_by_default = {}
for k, v in number_counter.items():
    if v == 1:
        howmanyways_in_number_by_default[k] = 0
    else:
        howmanyways_in_number_by_default[k] = (v*(v-1))/2

for i in range(n):
    ways = 0
    # 自分以外の通りから自分のとこを引く
    for k, v in howmanyways_in_number_by_default.items():
        if int(k) == As[i]:
            ways += ((number_counter[str(As[i])]-1)*(number_counter[str(As[i])]-2))/2
        else:
            ways += v

    print(int(ways))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

S = input()
N = len(S)

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

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

Submission status: Runtime Error

Solution code:

S = input()
N = len(S)

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

Submission status: Runtime Error

Solution code:

S = input()
N = len(S)

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

Submission status: Runtime Error

Solution code:
s = str(input())
k = len(s)

cnt=0
for i in range(k):
  if s[i]=!s[int((n+1)/2)-i]:
    cnt+=1
  if s[int((n+3)/2)+i]=!s[int((3*n+3)/2)-i]:
    cnt+=1

if cnt==0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
A = (len(S) - 1) // 2
B = (len(S) + 3) // 2
if S[0:A] == S[B - 1:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
A = (N - 1) // 2
B = ((N + 3) // 2)
if S[0:A] == S[B - 1:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S= input()
N = len(S)
A = (len(S) - 1) // 2
B = (len(S) + 3) // 2
if S[0:A] == S[B - 1:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
A = (N-1)//2
B = ((N+2)//2)
if S[0:A] == S[B:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
A = (N-1)//2
B = ((N+2)//2)
if S[0:A] == [B:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
i = list(S)
if i[0:(N-1)//2] == [((N+2)//2):N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
i = list(S)
if i[0:((N+3)//2-2)] == [((N+3)//2):N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
i = list(S)
if i[0:((N+2)//2)] == [(N+4)//2:N]:
  print('Yes')
elif:
  print('No')

Submission status: Runtime Error

Solution code:
def palindrome_check(st):
  n = 0
  l = len(st)
  while n<int((l-1)/2):
    if st[n] != st[l-n-1]:
      return False
  return True

st = int(input())
n = len(st)
if palindrome_check(st):
  if palindrome_check(st[:int(n-1/2)+1]):
    if palindrome_check(st[int(n+3/2):n]):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

Solution code:
s = input()
gyaku_s = s[::-1]
len_s = len(s)

if s == gyaku_s:
  if s[:(len_s - 1) / 2 - 1] == gyaku_s[:(len_s - 1) / 2 - 1]:
    if s[(len_s + 3) / 2 - 1 : n - 1] == gyaku_s[(len_s + 3) / 2 - 1 : n - 1]:
      print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline


def main():
    S = input().strip()
    for i in range((len(S)-1)//2-1):
        if S[i] == S[(len(S)-1)//2-i-1] and S[(len(S)+3)//2+i-1] == S[len(S)-i-1]:
            answer = "Yes"
        else:
            print("No")
            exit()
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
S=input()
imort sys
s=[]
for i in S:
    s.append(i)

N=len(s)
for i in range(int((N-1)/2)):
    if s[i]!=s[i+1+int((N-1)/2)]:
        print("No")
        sys.exit()
#print("!")
#for i in range(int((N+3)/2),N+1):
#    if s[i]!=s[i]:
#        print("No")
#        sys.exit()
for i in range(int((N-1)/4)):
    if s[i]==s[int((N-1)/2)-i]:
        print("No")
        sys.exit()

print("Yes")

Submission status: Runtime Error

Solution code:
S=input()
l=len(S)
S1=S[1:(l+1)/2]
S2=S[(l+3)/2::]
if S==S[::] 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)
ans='No'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):N+1]
        if new2==list(reversed(new2)):
            ans='Yes'
print(ans)

Submission status: Runtime Error

Solution code:
S=list(input())
n=len(S)
ans='NO'
if S==list(reversed(S)):
    new=S[0:((n-1)//2)]
    if new==list(reversed(new)):
        new2=S[((n+3)//2):N+1]
        if new2==list(reversed(new2)):
            ans='YES'
print(ans)

Submission status: Runtime Error

Solution code:
S = input()

words = []
words.append(S)
words.append(S[:(N-1)//2])
words.append(S[(N+3)//2 - 1:])

ans = all([word == word[::-1] for word in words])

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

Submission status: Runtime Error

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

if S == S[::-1]:
    if S[0:(N-1)/2] == S[0:(N-1)/2][::-1]:
        if S[((N+3)/2)-1:N] == S[((N+3)/2)-1:N][::-1]:
            print("Yes")
            sys.exit()


print("No")

Submission status: Runtime Error

Solution code:
S = map(str,input().split())
N = int(len(S))
S_a = S[:(N-1)//2]
S_b = S[(N+1)//2:]

if S == S[::-1] and S_a == S_a[::-1] and S_b == S_b[::-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
a = list(input().split())

for i in range(len(a)):
    n = n - int(a[i])

if n >= 0:
    print(n)
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
S2 = []
S3 = []
S4 = []
range1 = int((int(len(S))+1)/2)
range2 = int((int(len(S))-1)/2)
range3 = int((range2+1)/2)
range4 = int((int(len(S))+3)/2)
range5 = int((range4+1)/2)
isStrong = "Yes"
for i in S:
  S2.append(i)
  
for i in range(range2):
  S3.append(S2[i])
  
for i in range(range4-1,len(S)):
  S4.append(S2[i])
  
for i in range(range1):
  if S2[i]!=S2[-i-1]:
    isStrong = "No"

for i in range(range3):
  if S3[i]!=S3[-i-1]:
    isStrong = "No"

for i in range(range5):
  if S4[i]!=S4[-i-1]:
    isStrong = "No"
    
print(isStrong)

Submission status: Runtime Error

Solution code:
word=list(input())
check=True
for i in range(len(word)//2)
    if word[i]==word[len(word)-1]:
        continue:
    else:
          check=False
          braek:
if check==True:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
word=list(map.string().split())
check=True
for i in range(len(word)//2)
    if word[i]==word[len(word)-1]:
        continue:
    else:
          check=False
          braek:
if check==True:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()

def judge(x):
  if "".join(list(reversed(x))) == x:
    return True
  else:
    return False
  
def solve(x):
  if judge(x) and judge(x[0:(len(x)-1)/2]) and judge(x[(len(x)+1)/2:]):
    print("Yes")
  else:
    print("No")
    
    
solve(S)

Submission status: Runtime Error

Solution code:
S=input()
n=len(S)
a=0
b=0
for i in range((n-1)/2):
	if S[i]!=S[n-i]:
    	a=1
        print("No")
        break;
p=""
q=""
if a==0:
	for i in range((n-1)/2):
		p.append(S[i])
    	q.append(S[i+1+(n-1)/2])
	for i in range((len(p)-1)/2):
  		if p[i]!=p[len(p)-i] or q[i]!=q[len(p)-i]:
        	b=1
            print("No")
            break;
if a==0 and b==0:
	print("Yes")

Submission status: Runtime Error

Solution code:
S = list(input())
n = (len(S)-1)//2
for i in range(n):
  if S[i] == S[-(i+1)] and S[i] == S[i+n+1]:
    continue
  else:
    print('No')
for i in 
print('Yes')

Submission status: Runtime Error

Solution code:
S = input()
S_rvs = S[::-1]
N = len(S)

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

Submission status: Runtime Error

Solution code:
# input
S = input()

# check
N = len(S)

print(f"{S}\t{S[:int((N - 1) / 2)]}\t{S[int((N + 2) / 2):]}")

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

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
mae = (n-1)//2
usiro = (n+3)//2

for i in range(mae):
  if s[i] != s[mae-1-i]:
    print("No")
    exit()
    
for i in range(usiro-1, n):
  if s[i] != s[n-1+usiro-i]:
    print("No")
    exit()
print("Yes")

Submission status: Runtime Error

Solution code:
def kaibun(s):
    for _ in range(n//2):
        if s[_]==s[n-_-1]:
            continue
        else:
            return False
    return True

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

Submission status: Runtime Error

Solution code:
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag and i <= l:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:(l-1)/2]
i = 0
l = len(a)
while flag and i <= l:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)/2 - 1:]
i = 0
l = len(b)
while flag and i <= l:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys
s = sys.stdin.readline()
i = 0
l = len(s)
flag = True
while flag:
  if s[i] != s[l-1]:
    flag = False
  i += 1
  l -= 1
l = len(s)
a = s[0:(l-1)/2 - 1]
i = 0
l = len(a)
while flag:
  if a[i] != a[l-1]:
    flag = False
  i += 1
  l -= 1
b = s[(len(s) + 3)/2 - 1: -1]
i = 0
l = len(b)
while flag:
  if b[i] != b[l-1]:
    flag = False
  i += 1
  l -= 1
if flag:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

def is_circular(string):
    reverse = string[::-1]
    if string == reverse:
        return True
    else:
        return False

if is_circular(S) and is_circular(S[:(N)//2]) and is_circular(S[(N+3)//2]):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A = list(input())
A1 = reversed(A)

B = A[0:(len(A)-1)/2-1]
B1 = reversed(B)

C = A[(len(A)+3)/2-1:-1]
C1 = reversed(C)

if A == A1 and B == B1 and C == C1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
flg = False
for i in range(len(S)//2):
    if S[i] == S[len(S)-i]:
        flg = True
    else:
        flg = False
for i in range((len(S)-1) //2//2):
    if S[i] == S[(len(S)-1)//2-i]:
        pass
    else:
        flg = False
for i in range((len(S)-(len(S)+3)//2)//2):
    if S[i] == S[(len(S)+3)//2 -i]:
        pass
    else:
        flg = False

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

Submission status: Runtime Error

Solution code:
S = input()
flg = False
for i in range(len(S)):
    if S[i] == S[len(S)-i]:
        flg = True
    else:
        flg = False
for i in range((len(S)-1) /2):
    if S[i] == S[(len(s)-1)/2-i]:
        pass
    else:
        flg = False
for i in range((len(S)+3)/2, N):
    if S[i] == S[(len(S)+3)/2) -i]:
        pass
    else:
        flg = False

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

Submission status: Runtime Error

Solution code:
s=list(input())
#s=['a','b','a','d','a','b','a']
L=int((len(s)-1)/2)
f1=0
for i in range(L-1):
    if s[0+i]==s[len(s)-i]:
    else:
        f1+=1
        
LL=L//2
f2=0
if f1==0:
    for j in range(LL-1):
        if s[0+j]==s[len(L)-i]:
    else:
        f2+=1

if f1==0&f2==0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
P = 0
for i in range (N-1//2):
    if S[i] == S[N-1-i]:
        for k in range(N-1//2):
            if S[k] == S[((N-1)//2)-k] and S[((N+1)//2)+k] == S[N-1-k]:
                P = P
            else:
                P += 1
        else:
            P += 1

if P == 0:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

S = str(input())
N = len(S)-1

N1 = (N-1)/2
N2 = (N+3)/2

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

S = str(input())
N = len(S)-1

N1 = (N-1)/2
N2 = (N+3)/2

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]

flag = True
for ss in [s1, s2, s3]:
    ss_l = len(ss)
    for i in range(ss_l):
        if ss[i] != ss[ss_l-i-1]:
            flag = False
            break
    if not flag:
        break

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

S = str(input())
N = len(S)-1


N1 = (N-1)/2
N2 = (N+3)/2

s1 = S[:N]
s2 = S[:N1]
s3 = S[N2-1:N]

flag = True
for ss in [s1, s2, s3]:
    ss_l = len(ss)
    for i in range(ss_l):
        if ss[i] != ss[ss_l-i-1]:
            flag = False
            break
    if not flag:
        break

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

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
n1=(n-1)/2
n2=(n+1)/2
s1=s[0:n1]
s2=s[n2: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)
s1=s[0:(n-1)/2]
s2=s[(n+1)/2: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)
s1=s[0:(n-3)/2]
s2=s[(n+1)/2:n-1]
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()
cnt = 0
N = len(S)
for i in range(int((N-3)/2)):
    if S[i] == S[N-i-1]:
        cnt += 1
    else:
        pass
if cnt == (N-3)/2 and S % 4 != 1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])
 
word = input().lower()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:])
print("Yes" if issuper else "No"))

Submission status: Runtime Error

Solution code:
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])

word = input()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:])
print("Yes" if isupper else "No")

Submission status: Runtime Error

Solution code:
s = list(input())
a = (len(s) - 1)/2
b = s[:a]
c = b[::-1]
if b == c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
n=len(s)
a = 0
for i in (0,n):
  if s[i] == s[(n-3)/2-i] and s[(n-3)/2-i] == s[(n+1)/2+i] and s[(n+1)/2+i] == s[n-i-1]:
    continue
  else:
    print("No")
    exit(0)
print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
n=len(s)
a = 0
for i in (0,n):
  if s[i] == s[(n-3)/2-i] == s[(n+1)/2+i] == s[n-i-1]:
    continue
  else:
    print("No")
    exit(0)
print("Yes")

Submission status: Runtime Error

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

"""
def check_kaibun(kaibun):
    n = len(kaibun)
    middle = n // 2
    count = 0
    print("s[i]:{}".format(kaibun))
    for i in range(middle):
        if kaibun[i] == kaibun[n - i]:
            count += 1
        else:
            count = 0
            break
    if count == middle:
        return True
    else: 
        return False
"""

left_center = (l-2) // 2
right_center = (l+2) // 2

for i in range(left_center // 2):
    if s[i] != s[left_center - i]:
        print("No")
        break
else:
    for i in range(len(s[right_center:]) // 2):
        if s[right_center + i] != s[l - i - 1]:
            print("No")
            break
    else:
        right = True
"""
check1 = check_kaibun(s[:left_center])
check2 = check_kaibun(s[right_center:])
"""
if right == True: 
    print("Yes")

Submission status: Runtime Error

Solution code:
S = input()
judge = True
for i in range(len(S)//2):
    if S[i] != S[len(S) - i - 1]:
        judge = False
        break


if judge:        
    for i in range(int((len(S)-1)/2)):
  
        if S[i] != S[int((len(S)-1)/2)- 1 - i]:
            judge = False
            break
        elif S[int((N+3)/2)-1 + i] != S[N-1-i]:
            judge = False
            break

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

Submission status: Runtime Error

Solution code:
S = input()
judge = True
for i in range(len(S)//2 + 2):
    if S[i] != S[len(S) - i - 1]:
        judge = False
        break


if judge:        
    for i in range(int((len(S)-1)/2)):
  
        if S[i] != S[int((len(S)-1)/2)- 1 - i]:
            judge = False
            break
        elif S[int((N+3)/2)-1 + i] != S[N-1-i]:
            judge = False
            break

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

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
ans='Yes'
if N==3:
  S[0]!=S[2]:
    ans='No'
else:
    if int((N-1)/2)%2==1:
        for i in range((N-3)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
    else:
        for i in range((N-1)//4):
            if S[i] != S[((N-3)//2)-i] or S[((N+1)//2)+i] != S[N-i-1]:
                ans='No'
 
print(ans)

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
ans='Yes'
if N=3:
    if S[0]!=S[2]:
        ans='No'
else:
    if int((N-1)/2)%2==1:
        for i in range((N-3)//4):
            if S[i] != S[(N-3)//2-i] or S[(N+1)//2+i] != S[N-i-1]:
                ans='No'
    else:
        for i in range((N-1)//4):
            if S[i]!=S[(N-3)//2-i] or S[(N-1//2)+i]!=S[N-i-1]:
                ans='No'

print(ans)

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
ans='Yes'

if int((N-1)/2)%2==1:
    for i in range((N-3)//4):
        if S[i] != S[(N-3)//2-i] or S[(N+1)//2+i] != S[N-i-1]:
            ans='No'
else:
    for i in range((N-1)//4):
        if S[i]!=S[(N-3)//2-i] or S[(N-1//2)+i]!=S[N-i-1]:
            ans='No'

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


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

if v==((n-1)//2)
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = str(input())
n = len(s)
if ((n+1)/2)%2 != 0:
  if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[((n-1)/2)-j] for j in range(1,(n+3)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+3)/4)):
    print('Yes')
  else:
    print('No')
else:
  if (s[i-1] == s[n-i] for i in range(1,(n+1)/2)) and (s[j-1] == s[(n-2*j-1)/2] for j in range(1,(n+1)/4)) and (s[(n+2*k-1)/2] == s[n-k] for k in range(1,(n+1)/4)):
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys

s = input()
N = len(s)
j = int((N-1)/2)
i = 0
while i!=j:
  if s[i] == s[j]:
    print("YES")
  else:
    print("No")
    sys.exit()
  i = i+1
  j = j-1
p = int((N+3)/2 -1)
q = N
while p!=q:
  if s[p] == s[q]:
    pass
  else:
    print("No")
    sys.exit()
  p = p+1
  q = q-1

a = 0
while a != N:
  if s[a] == s[N]:
    pass
  else:
    print("No")
    sys.exit()
  a = a+1
  N = N-1
if a >= (N-1)/2:
  print("Yes")

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
x=(n-1)//2
while i<x:
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
  i=i+1
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
s=input()
n=len(s)
x=(n-1)//2
while i in range(x):
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s = ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans:_ = "No"
        
        while True:
            reversed_s = "".join(reversed(gv.s))
            slen = len(gv.s)
            
            if gv.string_reverse_chk(gv.s) is False : break
        
            if gv.string_reverse_chk(gv.s[0:int((slen -1)/2)]) is False : break
            if gv.string_reverse_chk(reversed_s[0:int((slen -1)/2)]) is False : break
        
            if gv.string_reverse_chk(gv.s[int((slen +3)/2 -1):slen]) is False : break
            if gv.string_reverse_chk(reversed_s[int((slen +3)/2 -1):slen]) is False : break
            
            
            ans = "Yes"
            break
        
        print(ans)
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s :_= ''.join(reversed(s))
        pass
    
    def solve(gv):
        pass
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        pass
    
    def string_reverse_chk(gv, s:str):
        rev_s :_= ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        pass
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s :_= ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        pass
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s :_= ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans:_ = "No"
        
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

Solution code:
##======================================python3
import sys
import collections
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

class Run:
    def build(gv):
        gv.s = input()
    
    def string_reverse_chk(gv, s:str):
        rev_s :_= ''.join(reversed(s))
        if s == rev_s:
            return True
        return False
    
    def solve(gv):
        
        ans:_ = "No"
        
        while True:
            reversed_s = "".join(reversed(gv.s))
            slen :_= len(gv.s)
            
            if gv.string_reverse_chk(gv.s) is False : break
        
            if gv.string_reverse_chk(gv.s[0:int((slen -1)/2)]) is False : break
            if gv.string_reverse_chk(reversed_s[0:int((slen -1)/2)]) is False : break
        
            if gv.string_reverse_chk(gv.s[int((slen +3)/2 -1):slen]) is False : break
            if gv.string_reverse_chk(reversed_s[int((slen +3)/2 -1):slen]) is False : break
            
            
            ans = "Yes"
            break
        
        print(ans)
        
if __name__ == '__main__':
    run = Run()
    run.build()
    run.solve()

Submission status: Runtime Error

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


string = input()
n = len(string)
n-=1
str1 = string[0:((n-1)//2)]
str2 = string[((n+3)//2):n]
if check(str1) and check(str2):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

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


string = input()
n = len(string)
n-=1
str1 = string[0:((n-1)/2)]
str2 = string[((n+3)/2):n]
if check(str1) and check(str2):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if len(S)%2==0:
        pass
    else:
        if S==inv:
            i+=1
            N=int((len(S)-1)/2)
        for x in range(N-1):
            if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
                pass
            else:
                j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')

Submission status: Runtime Error

Solution code:
class atcorder:
    
    S=list(input())
    inv=list(reversed(S))
    i=0
    j=0
    if len(S)%2==0:
        pass
    else:
        if S==inv:
            i+=1
            N=int((len(S)-1)/2)
        for x in range(N-1):
            if S[x]==S[N-1-x] and inv[x]==inv[N-1-x]:
                pass
            else:
                j+=1
                
    if j==0 and i==1:
        print('yes')
    else:
        print('no')

Submission status: Runtime Error

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