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)

def kaibun(string):
  index = 0
  ans = True
  while i < n-1-i:
    if s[i] != s[n-1-i]:
      ans = False
      return ans
      break
    index += 1
  return ans

ans_total = def(s)

zenhan = s[:n//2]
kouhan = s[n//2:]

ans_zen = def(zenhan)
ans_kou = def(kouhan)

if ans_total == True and ans_zen == True and ans_kou == True:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
s=input()

n=len(s)
h=(n-1)//2
hh=h//2
h3=(n+3)//2
h3h=(h3+n)//2

s1=s[:h]
s2=s[h+1:]
s3=s[:hh]
s4=s[hh+1:h]
s5=s[h3-1:h3h-1]
s6=s[h3h:]

f1=f2=f3=True
for i in range(len(s1)):
  if s1[i]!=s2[len(s2)-1-i]:
    f1=False
for i in range(len(s3)):
  if s3[i]!=s4[len(s4)-1-i]:
    f2=False
for i in range(len(s5)):
  if s5[i]!=s6[len(s6)-1-i]:
    f3=False

ans='Yes' if f1==f2==f3==True else 'No'
print(ans)

Submission status: Runtime Error

Solution code:
num=str(input())
temp=num
rev=0
while(num>0):
    dig=num%10
    rev=rev*10+dig
    num=num//10
if(temp==rev):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
if L > 5:
    small = round((N-1)/2)
    big = round((N+3)/2)-1
    smallS = S[0:small]
    bigS = S[big:N]

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

Submission status: Runtime Error

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

t = s[::-1]
c = t[:(n-1)//2-1]
d = t[-(n+3)//2:]
if (a==d) and (b==c) :
  if(a==b):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) & judge(sb)
    return ok

s = str(input())

if (len(s) % 2 == 0):
    print("No")
else:
    if strong_judge(s):
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

if L > 5:
    small = round((N-1)/2)
    big = round((N+3)/2)-1
    smallS = S[0:small]
    bigS = S[big:N]

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

Submission status: Runtime Error

Solution code:
def F(s):
	for i in (len(s) // 2):
		if s[i] != s[-i]:
			return False
	return True

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

Submission status: Runtime Error

Solution code:
if s == s[::-1]:
  #前半部分の回文チェック
  p = int((n-1)/2)
  f = s[:p]
  if f == f[::-1]:
    #後半部分の回文チェック
    q = int((n+3)/2)
    l = s[q-1:]
    if l == l[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

Solution code:
def pal(string):
    return True if string==string[::-1] else False

S = input()

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

Submission status: Runtime Error

Solution code:
def isPalindrome(str): 
 
    for i in xrange(0, len(str)/2):  
        if str[i] != str[len(str)-i-1]: 
            return False
    return True
  
s = input()
ans = isPalindrome(s) 
  
if (ans): 
    print("Yes") 
else: 
    print("No")

Submission status: Runtime Error

Solution code:
str = input()
n = len(str)
str_list = list(str)

for i in range(0,n//2):
    if str_list[i] != str_list[n//2-i-1]:
        print('No')
        return

for j in range(n//2+1,n):
    if str_list[i] != str_list[-i-1]:
        print('No')
        return

print('Yes')

Submission status: Runtime Error

Solution code:
def kaibunCheck(s):
  flag = True
    n = len(s)
    for i in range((n + 1) // 2):
      if s[i] != s[(i + 1) * (-1)]:
        flag = False
    
  return flag
        
S = input()
N = len(S)

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = [i for i in input()]
f = 0
for i in range(len(S)//2):
  if not S[i] == S[-i]:
    f = 1
    print('No')
    break
if f == 0:
  for i in range(int((len(S)-1)/2)):
    if not S[i] == S[int((len(S)-1)/2-i)]:
      f = 1
      print('No')
      break
if f == 0:
  for i in range((len(S)+3)/2, len(S)) and f == 0:
    if not S[i] == S[-i]:
      f = 1
      print('No')
      break
if f ==0:
  print('Yes')

Submission status: Runtime Error

Solution code:
S = input().split()
S_rev = list(reversed(S))
N = len(S)

if S != S_rev:
  print('No')
else:
  S1 = S[:(N-3)/2]
  S2 = S[(N-3)/2:]
  S1_rev = list(reversed(S1_rev))
  S2_rev = list(reversed(S2_rev))
  
  if S1==S1_rev and S2 == S2_rev:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

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

def strong_judge(s):
    ok = judge(s)
    n = len(s)
    m = (n - 1) // 2
    kf = (m - 1) // 2
    kb = m + kf + 1
    sf = s[0:m]
    sb = s[(m + 1):n]
    if ok:
        ok = judge(sf) & judge(sb)
    return ok

s = str(input())

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

Submission status: Runtime Error

Solution code:
s = list(input())
n = len(s)
s_0 = s[:(n-1)//2]
s_1 = s[(n+1)//2:]
if s_0 == s_0[::-1] and s_1 == s_1[::-1] and s == s[::-1]
    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[-i-1] == S[(N-1)//2-1-i] == S[(N+3)//2+i-1]:
    print("Yes")
    break
else:
  print("No")

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
count = 0
halfn = int((n-1) / 2)
whalfn = int((n-1) / 4)
half = s[0:halfn]

for i in range(len(s)):
    if s[i] != s[-i-1]:
      count += 1
      break
    else:
      pass

if len(half) % 2 == 0:
  for i in range(len(half)+1):
    if half[i] != half[-i-1]:
      count += 1
      break
    else:
      pass
else:
  for i in range(len(half)):
    if half[i] != half[-i-1]:
      count += 1
      break
    else:
      pass
  
if count == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

num = len(s) * 0.5 - 1.5
index = int((n + 3) /2 )
for i in range(num):
  if s[index+i] != s[n-1-i]:
    print("No")
    exit()
   
  
print("Yes")

Submission status: Runtime Error

Solution code:
s=str(input())
n=len(s)
cnt=True
for i in range((n-1)/2):
    if s[i]!=s[n-i]:
        cnt=False
for j in range(int((n-1)/4)):
    if s[j]!=s[(n-1)/2-j] or s[(n-1)/2+j]!=s[n-j]:
        cnt=False
if cnt:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

def judge(start=0, end=s_len)
  for i in range(start, end):
    if s[start+i] == s[end-1-i]:
      continue
    else:
      return 1
  return 0

if not judge() and not judge(end=(s_len-1)//2) and not judge(start=(s_len+3)//2-1):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
half = int(len(s) / 2)
while len(s) !=1:
    s1 = s[0:half]
    s2 = s[(half+1):]
    for i in range(half):
        if s1[i] !=s2[i]:
            print('No')
            exit()
    s = s1
    half = int(len(s) / 2)
    if len(s) ==3:
        break
print('Yes')

Submission status: Runtime Error

Solution code:
def palind(word):
  word = word.lower()
  return word[::-1] ==word

num1 = int((N-1)/2)
num2 = int((N+3)/2)

text1 =S[0::num1]
text2 =S[num2-1::]

if palind(S) == True and palind(text1) == True and palind(text2) == True:
  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):] then:
  print('YES')
else print('NO')

Submission status: Runtime Error

Solution code:
def kaibun(str):
    return True if str == str[::-1] else False

s = input()
if not kaibun(s) :
    print('No')
    return
n = len(s)
n1 = (n - 1) // 2
if not kaibun(s[:n1]) :
    print('No')
    return
n2 = (n + 3) // 2 - 1
if not kaibun(s[n2:]) :
    print('No')
    return
print('Yes')

Submission status: Runtime Error

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

s_1 = s[:(len(s)-1)/2]
s_2 = s[(len(s)-3)/2:]

if is_kaibun(s) and is_kaibun(s_1) and is_kaibun(s_2):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 == rev2:
    if kai3 == rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
 def is_even(num):
  if num % 2 == 0:
    return True
  else:
    return False

string = input() 
N = string.length
if (is_even(N)):
  return 'No'
if (N < 3 or N >99):
  return 'No'

if (N == N[::-1]):
  return 'Yes'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
count = 0
halfn = int((n-1) / 2)
whalfn = int((n-1) / 4)
half = s[0:halfn]

if len(half) % 2 == 0:
  for i in range(len(half)+1):
    if half[i] != half[-i-1]:
      count += 1
      break
    else:
      pass
else:
  for i in range(len(half)):
    if half[i] != half[-i-1]:
      count += 1
      break
    else:
      pass
  
if count == 0:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
S = input()
N = len(S)
kai = []
kai2 = []
kai3 = []

for i in range(N):
  kai.append(S[i])

for i in range(1, ((N - 1) / 2 + 1)):
  kai2.append(S[i])

for i in range(((N + 3) / 2), N + 1):
  kai3.append(S[i])

rev = kai.reverse
rev2 = kai2.reverse
rev3 = kai3.reverse

if kai == rev:
  if kai2 = rev2:
    if kai3 = rev3:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
ef hantei(s):
    rev_s = s[::-1]

    for x in range(len(s)):
        if s[x] != rev_s[x]:
            return False
    
    return True

s = input()

if hantei(s) and hantei(s[:int((len(s)-1)/2)]) and hantei(s[int((len(s)+3)/2)-1:]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(S)):
    if S[i] != S[-i-1]:
        ans = 'No
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)

Submission status: Runtime Error

Solution code:
S=input()
N=len(S)
S1=list(S[0:(N-1)//2])
S2=list(S[(N+3)//2-1:])
if(len(S1)%2==1):
    S1.pop(len(S1)//2)

if(len(S2)%2==1):
    S2.pop(len(S2)//2)

for i,s in enumerate((S1)):
    if(s!=S1[-1-i]):
        print('No')
        sys.exit()

for i,s in enumerate((S2)):
    if(s!=S2[-1-i]):
        print('No')
        sys.exit()
        
print('Yes')

Submission status: Runtime Error

Solution code:

l = list(input())

li = l.copy()

if l != li[::-1]:
	print('No')

	exit(1)

li = l[:((len(l) - 1) // 2 )]
lf = li.copy()
if li != lf[::-1]:
	
	print('No')
	
	exit(2)

li = l[((len(l) + 3) // 2) - 1:]
lf = li.copy()
if li != lf[::-1]:
	print(li, lf)
	print('No')
	exit(3)

print('Yes')

Submission status: Runtime Error

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

using namespace std;

bool check_STR(string cad, int n)
{
    for (int i = 0, j = n - 1; i < n/2; i++, j--)
        if (cad[i] != cad[j])
            return false;
    return true;
}
int main()
{
    string cad, cad_S, cad_E; cin >> cad;
    int n = cad.size();
    cad_S = cad.substr(0, (n - 1)/ 2);
    cad_E = cad.substr((n+3)/2 - 1);
    if (check_STR(cad, n) && check_STR(cad_S, cad_S.size()) && check_STR(cad_E, cad_E.size()))
        puts("Yes");
    else
        puts("No");
 
}

Submission status: Runtime Error

Solution code:
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)

counter = 0
for i in range(int(len(S_list)/2)):
  if(S_list[i]==S_list[i+int(len(S_list)/2)+1]):
    counter = counter + 1
  else:
    counter = counter
    
if(counter < int(len(S_list)/2)):
    print("NO")
    
counter_ = 0
counter__ = 0
for i in range(int(len(S_list)/4)):
  if(S_list[i]==S_list[i+int(len(S_list)/4)+1]):
    counter_ = counter_ + 1
    if(S_list[i+int(len(S_list)/2)+1]==S_list[i+int(len(S_list)/2)+int(len(S_list)/2)]):
      counter__ = counter__ + 1

if((counter_ = int(len(S_list)/4))and(counter__ = int(len(S_list)/4))):
  print("Yes")

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
a = s[:(n-1)/2-1]
b = s[-(n+3)/2:]
lang:reverse.py
t = s[::-1]
c = t[:(n-1)/2-1]
d = t[-(n+3)/2:]
if (a==b) and (b==c) and (c==d):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
def check(s):
  n=len(s)
  if s!==s[::-1]:
    return "No"
  temp=s[:(n-1)//2]
  if temp!=temp[::-1]:
    return "No"
  temp=s[((n+3)//2)-1:]
  if temp!=temp[::-1]:
    return "No"
  return "Yes"
s=input()
print(check(s))

Submission status: Runtime Error

Solution code:
from itertools import combinations
N, M = map(int, input().split())

a = list(combinations(range(N), 2))
b = list(combinations(range(M), 2))
print(len(a)+len(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)

counter = 0
for i in range(int(len(S_list)/2)):
  #print(i,S_list[i],i+int(len(S_list)/2)+1,S_list[i+int(len(S_list)/2)+1])
  if(S_list[i]==S_list[i+int(len(S_list)/2)+1]):
    counter = counter + 1
  else:
    counter = counter
    
#print(counter,int(len(S_list)/2))
if(counter < int(len(S_list)/2)):
    print("No")
    
for i in range(int(len(S_list)/4)):
  #print(S_list[i],S_list[i+int(len(S_list)/4)+1])
  if(S_list[i]==S_list[i+int(len(S_list)/4)+1]):
    #print((S_list[i+int(len(S_list)/2)+1],S_list[i+int(len(S_list)/2)+int(len(S_list)/2)]))
    if(S_list[i+int(len(S_list)/2)+1]==S_list[i+int(len(S_list)/2)+int(len(S_list)/2)]):
      print("Yes")

Submission status: Runtime Error

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


def isloop(S):
    i = 0
    N = len(S)
    if i == N-1-i:
        return True
    while S[i] == S[N-1-i]:
        i += 1
        if i == N-1-i:
            return True
    return False


if isloop(S) and isloop(S1) and isloop(S2):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
s = input()
def is_kaibun(s):
  for i in range(len(s)//2):
    if s[i] != s[-i-1]:
      return False
  return True
n = len(s)
s1 = s[:(n-1)/2]
s2 = s[(n+1)/2:]
if is_kaibun(s) & is_kaibun(s1) & is_kaibun(s2):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a=list(input())
b=a.copy()
b.reverse()
n=len(a)
k=0
r=''
s=''
rr=''
t=''
if (n-1)//2>n:
    k+=1
else:
    t=a[:(n-1)//2]
    s=t.copy()
    s.reverse()
if (n+3)//2-1>n:
    k+=1
else:

    r=a[(n+3)//2-1:n]
    rr=r.copy()
    rr.reverse()
if k>0:
    print('No')
else:
    if a==b and r==rr and t==s:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
s = (input())
#a,b = map(int,input().split())
n = len(s)
b = n//2
s1 = s[0:b]
s2 = s[b+1:]
#print(s1,s2)
for i in range(len(s1)//2):
    if s1[i] == s1[-i-1]:
        flag1 = True
    else:
        flag1 = False
        break
for i in range(len(s2)//2):
    if s2[i] == s2[-i-1]:
        flag2 = True
    else:
        flag2 = False
        break
if flag1 and flag2:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

l_1 = letter[:int((N-1)/2)]
l_2 = letter[int((N+3)/2-1):]

if(l == l[::-1] and l_1 == l_1[::-1] and l_2 == l_2[::-1]):
    ans = "Yes"
else:
    ans = "No"
# print(l_1)
# print(l_2)

print(ans)

Submission status: Runtime Error

Solution code:
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)

counter = 0
for i in range(int(len(S_list)/2)):
  #print(S_list[i],S_list[i+int(len(S_list)/2)+1])
  if(S_list[i]==S_list[i+int(len(S_list)/2)+1]):
    counter = counter + 1
  else:
    counter = counter
    
#print(counter,int(len(S_list)/2))
if(counter < int(len(S_list)/2)):
    print("NO")
    
for i in range(int(len(S_list)/4)):
  if(S_list[i]==S_list[i+int(len(S_list)/4)+1]):
    #print(S_list[i],S_list[i+int(len(S_list)/4)+1])
    #print((S_list[i+int(len(S_list)/2)+1],S_list[i+int(len(S_list)/2)+int(len(S_list)/2)]))
    if(S_list[i+int(len(S_list)/2)+1]==S_list[i+int(len(S_list)/2)+int(len(S_list)/2)]):
      print("YES")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def g(S):
    N=len(S)
    if palindrome(S)==True and palindrome(S[((N+3)//2)-1])==True and palindrome(S[(N-1)//2])==True:
        return "Yes"
    else:
        return "No"
S=input()
print(g(S))

Submission status: Runtime Error

Solution code:

n, m = map(int, input().split())
import math
def comb(n, r):
	return math.factorial(s) // (math.factorial(s - r) * math.factorial(s))
print (comb(n,2) + comb(m,2))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define REP(i, n) for(long long i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;



int main() {
    string s;
    cin >> s;
    int ans = 1;
    REP(i,(s.size()/2 - 1)) {
        if (s[i] != s[s.size()-1-i]) {
            ans = 0;
        }
    }
    REP(i, (s.size()/4)) {
        if(s[i] != s[(s.size()/2) -  1 - i]) {
            ans = 0;
        }
        if(s[s.size() - i - 1] != s[s.size()/2 + 1 + i]) {
            ans = 0;
        }
    }
    if (ans == 1) {
        cout << "Yes";
    }else {
        cout << "No";
    }
}

Submission status: Runtime Error

Solution code:
import sys

S = input()

# S = 'akasaka'

N = len(S)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(1)

sub_S = S[:int((N - 1)/2)]
sub_S_rev = S[int((N + 3)/2)-1:]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(1)

print('Yes')

Submission status: Runtime Error

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

if s[0:len(s)//2] == s[len(s)//2+1:]:
    if sli[0:len(sli)//2]==sli[len(sli)//2+1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  auto palindrome = [](string s){
    for (int i = 0; i < s.size()/2; i++)
      if (s[i] != s[s.size() - i - 1])
        return 0;
    return 1;
  };
  if (!palindrome(s))
    cout << "No\n";
  else if (!palindrome(s.substr(0, (s.size())/2)) || !palindrome(s.substr(s.size()/2+1, (s.size()/2))))
    cout << "No\n";
  else cout << "Yes\n";
  return 0;
}

Submission status: Runtime Error

Solution code:
def strongispalindrome(s):
	if len(s) == 1:
		return True
	else:
		if s[::-1] == s:
			if strongispalindrome(s[:len(s)//2]) and strongispalindrome(s[len(s)//2 + 1:]):
				return True
		else:
			return False

s = input()
if strongispalindrome(s):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

Solution code:
s = str(input())
t = s[::-1]
if(s != t):
    print("No")
    exit
c = ""
for i in range((len(s)-1)//2):
    c += s[i]
e = c[::-1]
if(e != c):
    print("No")
    exit()
r = ""
for i in range(((len(s)+3)//2)-1,len(s),1):
    r += s[i]
y = r[::-1]
if(r != y):
    print("No")
    exit()
"""
print("Yes")
print(s,t)
print(e,c)
print(r,y)

Submission status: Runtime Error

Solution code:
import sys

S = input()

# S = 'akasaka'

N = len(S)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(1)

sub_S = S[:int((N - 1)/2)+1]
sub_S_rev = S[int((N + 3)/2)-1:]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(1)

print('Yes')

Submission status: Runtime Error

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



print(int(a+b))

Submission status: Runtime Error

Solution code:
n=input()
s=len(n)
d=int((s-1)/2)
p=int(s+3)/2
m=n[::-1]
n1=n[0:d-1]
n2=n1[::-1]
n3=n[p-1:]
n4=n3[::-1]
if n==m and n1==n2 and n3==n4:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
from scipy.misc import comb
N,M = map(int,input().split())
even = comb(N,2)
odd = comb(M,2)
print(int(even) + int(odd))

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)
top = s[:(n-1)//2]
bottom = s[(n+3)//2-1:]

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

Submission status: Runtime Error

Solution code:
from scipy.misc import comb
N,M = map(int,input().split())
even = int(comb(N,2))
odd = int(comb(M,2))
print(even + odd)

Submission status: Runtime Error

Solution code:
a=list(input())
b=a.copy()
b.reverse()
n=len(a)
t=a[:(n-1)//2]
s=t.copy()
s.reverse()
r=a[(n+3)//2-1:n]
rr=r.copy()
rr.reverse()

if a==b and r==rr and t==s:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
import sys

S = input()

# S = 'akasaka'

N = len(S)
N_sub = int((N - 1)/2)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(1)

sub_S = S[:N_sub]
sub_S_rev = sub_S[::-1]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(1)

print('Yes')

Submission status: Runtime Error

Solution code:
import collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect
import heapq


MOD = 1000000007


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


def get_inputs(cast_func=None):
    if cast_func is None:
        return input().split()
    else:
        return list(map(cast_func, input().split()))


def get_input(cast_func=None):
    if cast_func is None:
        return input()
    else:
        return cast_func(input())


def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def main():
    S = get_input()

    def is_palindrome(s):
        if len(s) == 1:
            return True
        else:
            return s == s[::-1] and is_palindrome(s[:len(s)//2]) and is_palindrome(s[len(s)//2 + 1:])

    if is_palindrome(S):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
def ispalindrome(s):
  n = len(s)
  return all([s[i] == s[n-i-1] for i in range(n // 2)])

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

Submission status: Runtime Error

Solution code:
S=list(input())

for i in range(len(S)//2):
    F=1
#    print(S[i],S[-(i+1)])
    if S[i]!=S[-(i+1)]:
        F=0
        break

N=len(S)
s=S[:N//2]
#print(s)
for i in range(N//2//2):
    FF=1
#    print(s[i],s[-(i+1)])
    if s[i]!=s[-(i+1)]:
        FF=0
        break

if F and FF:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
def ispalindrome(s):
    h = len(s) / 2
    for a, b in zip(s[:h], reversed(s[h+1:])):
        if a != b: return False
    return True
s = input()
n = len(s)
if ispalindrome(s) and ispalindrome(s[0:int((n+1)/2)-1]) and ispalindrome(s[int((n+3)/2)-1:n-1]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
def kai(s):
  n = len(s)
  for i in range(n):
    if s[i]!=s[n-i-1]:
      return False
  else:
    return True
  
s = input()
n = len(s)
if kai(s) and kai(s[:(n-1)//2]) and kai(s[(n+3)//2]):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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


def isloop(S):
    i = 0
    N = len(S)
    while S[i] == S[N-1-i]:
        i += 1
        if i == N-1-i:
            return True
    return False


if isloop(S) and isloop(S1) and isloop(S2):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

A=S[:(N-1)//2]
B=S[(N+3)//2-1:])
for i in range(len(A)):
	if A[i]!=A[-(i+1)]:
		print("No")
		exit()
for i in range(len(B)):
	if B[i]!=B[-(i+1)]:
		print("No")
		exit()
print("Yes")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(S: str):
    N = len(S)
    s1 = S[:(N-1)//2]
    s1r = s1[::-1]
    s2 = S[(N+3)//2]
    s2r = s2[::-1]
    if S == S[::-1] and s1 == s1r and s2 == s2r:
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()