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:
s=list(input())
N=len(s)
a=s[0:(N-1)//2]
b=s[(N+3)//2 -1:N]

S=list(reversed(s))
A=list(reversed(a))
B=list(reversed(b))


if s==S and a==A and b==B:
    print("Yes")
    exit()

print("No")

Submission status: Accepted

Solution code:
s=input()
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: Accepted

Solution code:
s = input()

length = len(s)

b = s[:int((length - 1)/2)]
a = s[int((length + 3)/2 - 1):]

if b == a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = str(input())

N=len(S)

s1=S[:int((N-1)/2)]
s2=S[int((N+3)/2-1):]

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

Submission status: Accepted

Solution code:
s = list(input())
n = len(s)
one=(n-1)//2
two=(n+3)//2
s_1 = s[:one]
s_2 = s[two-1:]
if s_1 == list(reversed(s_1)):
    if s_2 == list(reversed(s_2)):
        if s == list(reversed(s)):
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 11:55:12 2020

@author: 17664
"""
kaibun = input()
joken1 = kaibun[:(len(kaibun)-1)//2]
# print(joken1)
joken2 = kaibun[(len(kaibun)+2)//2:]
# print(joken2)

ans = 'No'

if kaibun == kaibun[::-1] and joken1 == joken1[::-1] and joken2 == joken2[::-1]:
    ans = 'Yes'
    
print(ans)

Submission status: Accepted

Solution code:
#-String Palindrome
s = input()
ans = True
def isP(s):
  return s == s[::-1]
if not isP(s):
  ans = False
if not isP(s[:len(s)//2]):
  ans = False
if ans:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S = list(input())
N = len(S)
f = S[:(N-1)//2]
r = S[(N+1)//2:]

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

Submission status: Accepted

Solution code:
S = input()
message = "No"
if S == S[::-1]:
	index = (len(S)-1)//2
	test = S[:index]
	if test == test[::-1]:
		index2 = (len(S)+3)//2
		otest = S[index2-1:]
		if otest == otest[::-1]:
			message = "Yes"
print(message)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def isPalindrome(string):
  m = len(string)//2
  judge = True
  for i in range (m):
    if string[i] != string[len(string) - i - 1]:
      judge = False
      break
  return judge

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

if isPalindrome(s) and isPalindrome(t) and isPalindrome(u):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

s=s0()

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

Submission status: Accepted

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

front = s[:(n-1)//2]
rear = s[(n+1)//2:]

if s == s[::-1] and front == front[::-1] and rear == rear[::-1]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def kaibun(s):
    flg=1
    if len(s)==1:
        pass
    else:
        for i in range(len(s)//2):
            if s[i]==s[len(s)-i-1]:
                pass
            else:
                flg=0
    return flg
    
def do():
    s=STR()
    n=len(s)
    s1=s[0:n//2]
    s2=s[n//2+1:n]
    flg=kaibun(s1)*kaibun(s2)*kaibun(s)
    if flg==1:
        print('Yes')
    else:
        print('No')
    
    
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
#!/usr/bin/python3

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


s = input()
l = len(s)
if isPalindrome(s) and isPalindrome(s[:l // 2]) and isPalindrome(s[l // 2 + 1:]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input().strip('\n')
S1=S[:(len(S)-1)//2]
S2=S[(len(S)-1)//2+1:]
flag=True
for i in range(len(S)//2):
    if S[i]!=S[-i-1]:
        flag=False               
for i in range(len(S)//2//2):
    if S1[i]!=S1[-i-1] or S2[i]!=S2[-i-1]:
        flag=False
print('Yes' if flag else 'No')

Submission status: Accepted

Solution code:
S=list(map(str,input()))
if S[0]==S[int((len(S)-1)/2-1)] and S[:int((len(S)-1)/2)]==S[int((len(S)+1)/2):]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

'''
akasaka

'''

import sys

S = input()

for i in range(len(S)):
    # print(i, len(S)-1 - i)
    if not S[i] == S[len(S)-1 - i]:
        print('No')
        sys.exit()


newS = list(S)[:int((len(S)-1)/2)]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

newS = list(S)[int((len(S)+3)/2 - 1):]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

print('Yes')

Submission status: Accepted

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

for i in range(l):
    if s[i] != s[l-i-1]:
        flag = False

for i in range((l-1)//2):
    if s[i] != s[(l-1)//2-1-i]:
        flag = False

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

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

Submission status: Accepted

Solution code:
s = input()

def palindrome(s):
    l = len(s)
    reverse_half_s_left = s[:l//2]
    reverse_half_s_right = s[(l//2)+1:]
    if reverse_half_s_left != reverse_half_s_right[::-1]: return False
    if reverse_half_s_left != reverse_half_s_right: return False
    return True

print ('Yes' if (palindrome(s)) else 'No')

Submission status: Accepted

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

check = 0
for i in range(int((N+1)/2)):
    if S[i] != S[N-1-i]:
        check +=1
    else:
        check +=0


S_1 = S[0:int((N-1)/2)]
N_1 = len(S_1)
check_1 = 0

for i in range(int((N_1+1)/2)):
    if S_1[i] != S_1[N_1-1-i]:
        check_1 +=1
    else:
        check_1 +=0

        
S_2 = S[int((N+1)/2):N]
N_2 = len(S_2)
check_2 = 0

for i in range(int((N_2+1)/2)):
    if S_2[i] != S_2[N_2-1-i]:
        check_2 +=1
    else:
        check_2 +=0

if check + check_1 + check_2 ==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a = str(input())
b = a[0:int((len(a)-1)/2)]
c = a[int((len(a)+1)/2):int(len(a))]
c = c[::-1]

if b != c:
	print('No')
elif b != b[::-1]:
	print('No')
elif c != c[::-1]:
	print('No')
else:
	print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    def f(t):
        l = len(t)
        for i in range(l//2):
            if t[i] != t[-1 - i]:
                return False
        return True
    l = len(s)
    if f(s) and f(s[:l//2]) and f(s[l//2+1:]):
        return "Yes"

    return "No"


print(main())

Submission status: Accepted

Solution code:
a = input()
rev_a = ''.join(list(reversed(a)))
# join    iterator to list and  join them into one string
# we cannot change iterator into string directly

length = len(a)
#palindrome_check
if a == rev_a:
    a1 = a[0:length//2]
    rev_a1 = ''.join(list(reversed(a1)))
    
    a2 = a[length//2+1:length]
    rev_a2 = ''.join(list(reversed(a2)))
    
    if a1 == rev_a1 and a2 == rev_a2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
def check(l):
  n=len(l)
  ret="Yes"
  for i in range(int(n/2)):
    if l[i]!=l[n-1-i]:
      ret="No"
      break
  return ret

S=list(map(str,input()))
N=len(S)
S1=[]
S2=[]
for i in range(N):
  if i<=int((N-1)/2)-1:
    S1.append(S[i])
  if i>=int((N+3)/2)-1:
    S2.append(S[i])

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

Submission status: Accepted

Solution code:
s = input(); 
n = len(s);
ss = "";
sss = "";
ssss = "";

for i in range(1,n+1):
  ss = ss + s[n-i];

mid = int((n+1)/2);

for i in range(mid-1):
  sss = sss + s[mid-2-i]
  
for i in range(mid-1):
  ssss = ssss + s[n - i -1];
  
if ss ==s and sss == s[0:mid-1] and ssss == s[mid:n]:
  print("Yes");
else:
  print("No")

Submission status: Accepted

Solution code:
S = input()

N = len(S)
a = int((N - 1) / 2)
b = int((N + 3) / 2)
A = S[:a]
B = S[b - 1:]

if A == B:
    if A == A[::-1] and B == B[::-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
s1 = s[0 : len(s) // 2]
s2 = s[len(s) // 2  + 1 : len(s)]
c, c1, c2 = 0, 0, 0
flag = 0
for i in range(len(s) // 2):
    if s[i] != s[len(s) - i - 1]:
        break
    else:
        c += 1
if c != len(s) // 2:
    print("No")
    exit()
for i in range(len(s1) // 2):
    if s1[i] != s1[len(s1) - i - 1]:
        break
    else:
        c1 += 1
if c1 != len(s1) // 2:
    print("No")
    exit()
for i in range(len(s2) // 2):       
    if s2[i] != s2[len(s2) - i - 1]:
        break
    else:
        c2 += 1
if c2 != len(s2) // 2:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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

s_ok = True  # sが回文か
for i in range(n):
  if s[i] != s[-1 - i]:
    s_ok = False

s_left = s[:(n - 1) // 2]  # Pythonのスライスは末尾の要素を含まないので、+1
s_left_ok = True
for i in range(len(s_left)):
  if s_left[i] != s_left[-1 - i]:
    s_left_ok = False

s_right = s[(n - 1) // 2 + 1:]
s_right_ok = True
for i in range(len(s_right)):
  if s_right[i] != s_right[-1 - i]:
    s_right_ok = False

if s_ok and s_left_ok and s_right_ok:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
s = str(input())
S = s[::-1]

if s==S:
    t = s[0:int((len(s)-1)/2)]
    T = t[::-1]
    #print(t)
    if t ==T:
        p = s[int((len(s)+3)/2)-1:]
        P = p[::-1]
        #print(p)
        if p == P:
            print("Yes")
            quit()

print("No")

Submission status: Accepted

Solution code:
s=input()
str1=""
str2=""

for j in range(int((len(s)-1)/2)):
  str1+=s[j]
  str2+=s[j+int((len(s)-1)/2+1)]
    
print("Yes" if str1==str2 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# Written by NoKnowledgeGG @YlePhan
# ('ω')
#
#import math
#mod = 10**9+7
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  s = input()
  slen = len(s)
  
  L_s = s[:((slen-1)//2)]
  R_s = s[((slen+3)//2)-1:]
  #print(L_s,R_s)
  if s == s[::-1]:
    if L_s == L_s[::-1]:
      if R_s == R_s[::-1]:
        print('Yes')
        exit()
  
  print('No')
  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  4 19:25:17 2020

@author: Kanaru Sato
"""

def parin(s):
    l = list(s)
    flag = 0
    for i in range(len(l)//2):
        if l[i] != l[len(s)-i-1]:
            flag = 1
    if flag == 0:
        return True
    else:
        return False


s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def is_kaibun(s):
  s_len = len(s)
  is_kaibun = True
  for i in range(s_len//2):
    is_kaibun *= (s[i] == s[-(i+1)])
  return is_kaibun

s = input()
N = len(s)
s1 = s[:(N+1)//2-1]
s2 = s[(N+3)//2-1:]
if is_kaibun(s) and is_kaibun(s1) and is_kaibun(s2):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
S=list(input())
N=len(S)
tsuyoikaibun=0
kaibun=0
for i in range((N-1)//2):
    if S[i]==S[(N-1)//2-i-1]and S[(N+1)//2+i]==S[N-i-1]: 
        tsuyoikaibun=tsuyoikaibun+1
    else:
        tsuyoikaibun=0
        break
for i in range (N):
    if S[i]==S[N-i-1]:
        kaibun=kaibun+1
    else:
        kaibun=0
        break
 
if kaibun==0 or tsuyoikaibun==0:
        print("No")
else:
        print("Yes")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
s= input()
flag = True
for i in range((len(s)-1)//2):
	if s[i] == s[len(s)-i-1]:
		continue
	else:
		flag = False
		break

if flag:
	left = s[:(len(s)-1)//2]
	right = s[(len(s)+3)//2-1:]
	if left == right:
		print("Yes")
	else:
		print("No")
else:
	print("No")

Submission status: Accepted

Solution code:
S = input()

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

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

#flag3= 1
for i in range((len(S) - 1)//4):
	if S[(len(S) + 3)//2-1+i] !=  S[len(S) -1-i]:
		flag=0
	#print(i,(len(S) + 3)//2-1+i,len(S) -1-i)
#print(flag,flag2,flag3)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
from collections import deque

S = input()

if S[::-1]== S:
    front = S[:len(S)//2]
    if front == front[::-1]:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

if kaibun==0 or tsuyoikaibun==0:
        print("No")
else:
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

N = len(S)
# [0:N//2] == [(N+1)//2:N]
A = int(N//2)
B = int((N+1)//2)
flag = True
if S[0:A] == S[B:N][::-1]:
    N = A
    A = int(N // 2)
    B = int((N + 1) // 2)
    if S[0:A] == S[B:N][::-1]:
        print("Yes")
        flag = False

if flag:
    print("No")

Submission status: Accepted

Solution code:
s = input()
slist = []
for i in range(len(s)):
    slist.append(s[i])

def isKaibun(s): #s is list
    s2 = s[:]
    s2.reverse()
    if s == s2:
        return 1
    return 0

if isKaibun(slist) and isKaibun(slist[:(len(slist)-1)//2]) and isKaibun(slist[(len(slist)+3)//2 -  1:]):
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
s = input()
n = len(s)
T = s[0:((n-1)//2)]

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

if s == s[::-1] and T == T[::-1] and U == U[::-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def ispalindrome(str):
    if str==str[::-1]:
        return 1
    else:
        return 0

S=input()
N=len(S)
score=0
score += ispalindrome(S)
score += ispalindrome(S[0:int((N-1)/2):1])
score += ispalindrome(S[int((N+3)/2):N-1:1])

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

Submission status: Accepted

Solution code:
S = input()

zyouken1 = S[0:(len(S)-1)//2]
zyouken2 =S[(len(S)+2)//2:len(S)]


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

Submission status: Accepted

Solution code:
def main():
    S = input()
    str = S[0:len(S) // 2]
    flg = S == "".join(list(reversed(S))) \
        and str == "".join(list(reversed(str)))
    print("Yes" if flg else "No")
    return


main()

Submission status: Accepted

Solution code:
s = input()

result = 'Yes'
j = int((len(s)-1)/2)

for i in range(j):
    if(s[i] != s[len(s)-i-1]):
        result = 'No'
        break

if(result !='No'):
    for i in range(int(j/2)):
        if(s[i] != s[j-i-1]):
            result = 'No'
            break

if(result !='No'):
    for i in range(int(j/2)):
        if(s[i+j+1] != s[len(s)-i-1]):
            result = 'No'
            break

print(result)

Submission status: Accepted

Solution code:
def main(args):
	user_input = str(input())
	x = int((len(user_input)-1)/2)
	y = int((len(user_input)+3)/2)
	if len(user_input) < 3 or len(user_input) > 99:
		print("No")
	else:
		modx_ui = user_input[0:x]
		mody_ui = user_input[y-1:]
		if user_input == user_input[::-1] and modx_ui == modx_ui[::-1] and mody_ui == mody_ui[::-1]:
			print("Yes")
		else:
			print("No")
  

if __name__ == '__main__':
    import sys
    sys.exit(main(sys.argv))

Submission status: Accepted

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

Submission status: Accepted

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

def kaibun(ss):
  for i in range(len(ss)//2):
    if ss[i]!=ss[-1-i]:
      print('No')
      exit()

kaibun(s)
kaibun(s[:sl//2])
kaibun(s[sl//2+1:])

print('Yes')

Submission status: Accepted

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

if a == M:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def kaibun(S):
    n = len(S)
    if(n%2 != 0):
        for i in range(int((n-1)/2)):
            if(S[i] != S[n-i-1]):
                return 0
    else:
        for i in range(int(n/2)):
            if(S[i] != S[n-i-1]):
                return 0
    return 1
def kaikai(S):
    if(kaibun(S) == 0):
        print('No')
        return 0
    else:
        N = len(S)
        n = int((N-1)/2)
        S1 = S[:n]
        S2 = S[n + 1:]
        if(kaibun(S1) == 1 and kaibun(S2) == 1):
            print('Yes')
        else:
            print('No')
S = input()
kaikai(S)

Submission status: Accepted

Solution code:
# 入力
s = input()

# 処理
leftLen = len(s) // 2 # 文字列の長さの半分
left = s[:leftLen] # sの左半分

# leftの回文チェック
leftReverse = left[::-1]
isPalindromeLeft = left == leftReverse;

# 全体の回文チェック
right = s[leftLen * -1:] # sの右半分
isPalindrome = isPalindromeLeft and (left == right)

# 結果
result = "Yes" if isPalindrome else "No"

# 出力
print(result)

Submission status: Accepted

Solution code:
s = input()
s_len = len(s)
f = s[0:(s_len-1)//2]
b = s[((s_len-1)//2)+1:s_len]
 
if f == b :
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# 入力
s = input()

# 処理
leftLen = len(s) // 2 # 文字列の長さの半分
left = s[:leftLen] # sの左半分

# leftの回文チェック
leftLenHalf = leftLen // 2
isPalindromeLeft = True
for i in range(0, leftLenHalf):
	if left[i] != left[leftLen - i - 1]:
		isPalindromeLeft = False

# 全体の回文チェック
right = s[leftLen * -1:] # sの右半分
isPalindrome = isPalindromeLeft and left == right

# 結果
result = "Yes" if isPalindrome else "No"

# 出力
print(result)

Submission status: Accepted

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

for i in range(N):
    if S[i] != S[N - 1 - i]:
        skaibun = 0

for i in range(int((N - 1) / 2)):
    if S[i] != S[int((N - 1)/2 )- 1 - i]:
        skaibun = 0

for i in range(int((N - 1) / 2)):
    if S[int((N + 3) / 2) - 1 + i] != S[N - 1 - i]:
        skaibun = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
s_len = len(s)
f = s[0:(s_len-1)//2]
b = s[((s_len-1)//2)+1:s_len]

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

Submission status: Accepted

Solution code:
import math
a= input()
length=math.floor(len(a)/2)
def kaibun(p):
    length_p=math.floor(len(p)/2)
    total_p = 0
    for i in range(length_p):
        if p[i] is not p[-1*i -1]:
            return False
            break
        else:
            total_p += 1
        if total_p == length_p:
            return True
if kaibun(a):
    if kaibun(a[:length]):
        print('Yes')
    elif length==1:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()
front = S[0:(len(S)-1)//2]
back = S[((len(S)-1)//2)+1:len(S)]

if front == back:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

def kaibun(s, start, end):
  for i in range(start, end // 2):
    if s[i] != s[end - i - 1]:
      return "No"
  return "Yes"

a = kaibun(S, 0, len(S))
b = kaibun(S, 0, int((len(S) - 1) / 2))
c = kaibun(S, int((len(S) + 3) / 2), len(S))
if a == "Yes" and b == "Yes" and c == "Yes":
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

s = input()
n = len(s)

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

Submission status: Accepted

Solution code:
s = input()


def reverse(text):
    return text == ''.join(list(reversed(text)))


N = len(s)

if reverse(s) and reverse(s[:int((N-1)/2)]) and reverse(s[int((N+3)/2) - 1:]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
n = len(s)
a = (n-1)/2
f = True
for i in range(int(a)):
    if s[i] != s[n-i-1]:
        print('No')
        f = False
        break
        
if f == True:
    for i in range(int(a/2)):
        if s[i] != s[int(a)-i-1]:
            print('No')
            f = False
            break
            
if f == True:
    print('Yes')

Submission status: Accepted

Solution code:
S=str(input())
def f(x):
  return x==x[::-1]
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if f(S) and f(S1) and f(S2):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(input())
s_reverse=list(reversed(s))
N=len(s)
s2=s[0:(N-1)//2]
s2_reverse=list(reversed(s2))
s3=s[((N+3)-1)//2:N+1]
s3_reverse=list(reversed(s3))
if s==s_reverse and s2==s2_reverse and s3==s3_reverse:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# ABC 159 B
import math
s = str(input())
N = len(s)
def check_pal(s):
  res = 0
  l = len(s)
  half = math.floor(l/2)
  for i in range(half):
    res += int(s[i] == s[-i-1])
  if res == half:
  	return True
  else:
    return False

a = int((N-1)/2)
b = int((N+3)/2)
bool1 = check_pal(s)
bool2 = check_pal(s[:a])
bool3 = check_pal(s[b-1:])

if bool1*bool2*bool3:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

S = input()
len_S = len(S)

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

Submission status: Accepted

Solution code:
s = input()

n = len(s)

s_left = s[:(n-1)//2]
s_right = s[(n+1)//2:]

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

Submission status: Accepted

Solution code:
def palindrome(str):
    return str == str[::-1]
str = input()
N = len(str)
former = int((N-1)/2)
letter = int((N+3)/2 - 1)
if palindrome(str) and palindrome(str[0:former]) and palindrome(str[letter:N]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

    s = input()
    if(not is_kaibun(s[:len(s)//2])):
        print("No")
    elif (s[:len(s)//2] != s[len(s)//2 + 1:]):
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

s = ns()
n = len(s)

def is_palind(s):
    if s != ''.join(reversed(s)):
        return False
    return True

flag = True
if not is_palind(s):
    flag = False
if not is_palind(s[:(n - 1) // 2]):
    flag = False

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

Submission status: Accepted

Solution code:
def kaibun(s):
    rev = ''.join(list(reversed(s)))
    #print(rev)
    if s == rev:
        return True

def main():
    S = input()
    N = len(S)

    if kaibun(S) and kaibun(S[:(N-1)//2]) and kaibun(S[(N+1)//2:]):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def f(x):
	return x == x[::-1]
S = input()

l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2-1:]

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

Submission status: Accepted

Solution code:

def f(x):
	return x == x[::-1]
S = input()

"""
l1 = (len(S)-1)//2
l2 = (len(S)+3)//2

S1 = S[:l1]
S2 = S[l2:]
"""

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

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

Submission status: Accepted

Solution code:

def f(x):
	return x == x[::-1]
S = input()
l = (len(S)-1)//2
S1 = S[:l]
S2 = S[l+1:]
if f(S) and f(S1) and f(S2):
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
def f(x):
  return x==x[::-1]
S=input()
n=(len(S)-1)//2
S1,S2=S[:n],S[n+1:]
if f(S) and f(S1) and f(S2):
  print('Yes')
else:
  print('No')