peterverebics/CodeNet_Python_118 huggingface dataset:
import sys
S = input()
N = len(S)

if (not S.islower()):
    sys.exit()
if (N < 3 or N > 99):
    sys.exit()
if (N%2 == 0):
    sys.exit()

av  = (N-1)/2
av  = int(av)
av2 = (N+3)/2
av2 = int(av2)

pal = S[0:av]
pal2 = S[av2-1:N]

if (pal == pal2[::-1]):
    if (pal == pal[::-1] and pal2 == pal2[::-1]):
        print('Yes')
else:
    print('No')
s = list(input())

thresh_1 = int((len(s) - 1) / 2)
thresh_2 = int((len(s) + 3) / 2)

s_1 = s[:thresh_1]
s_2 = s[thresh_2 - 1:]
print(s_1)
print(s_2)
if s == s[::-1] and s_1 == s_1[::-1] and s_2 == s_2[::-1]:
    print('Yes')
else:
    print('No')
def jds(strin):
    js = 0
    nn = len(strin)
    for kk in range(int(nn / 2)):
        if strin[kk] == strin[nn - kk -1]:
            js = 1
    return js

a = input()
jud = 0

b = a[:int((len(a) - 1) / 2)]
c = a[int((len(a) +2) / 2):]

jud += jds(a) + jds(b) + jds(c)

if jud == 3:
    print("Yes")
else:
    print("No")
import math

def jds(strin):
    js = 0
    newSt = strin[::-1]
    if strin == newSt:
        js +=1
    return js
 
a = input()
jud = 0

leee = len(a)

if leee % 2 == 0:
    b = a[:math.ceil((len(a) - 1) / 2)]
    c = a[math.floor((len(a) + 1) / 2):]
else:
    b = a[:int((len(a) - 1) / 2)]
    c = a[int((len(a) + 2) / 2):]
 
jud += jds(a) + jds(b) + jds(c)
 
print(jud)
if jud == 3:
    print("Yes")
else:
    print("No")
s=input()
flag=True
n=len(s)
if s!=reversed(s):
    flag=False
if s[:(n-1)//2]!=reversed(s[:(n-1)//2]):
    flag=False
if s[(n+3)//2-1:]!=reversed(s[(n+3)//2-1::-1]):
    flag=False
print("Yes" if flag else "No")
S = str(input())
temp = len(S)
if S == S[::-1]:
    tempi =S[0:(temp-1)//2]
    #print(tempi)
    if tempi == tempi[::-1]:
        tempi2 = S[(temp+3)//2+1:]
        #print(tempi2)
        if tempi2 == tempi2[::-1]:
            print('Yes', end='')
        else:
            print('No', end='')
    else:
        print('No', end='')
else:
    print('No', end='')
# -*- coding: utf-8 -*-
S = input()
N = len(S)
s2 = S[:int((N-1)/2)]
s3 = S[int((N+3)/2 -1):]
if s2 == s2[::-1]:
    if s3 == s3[::-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s = input()
n = len(s)

s_lh_r = s[n//2+1:][::-1]
s_fh = s[:n//2]

if not s_lh_r == s_fh:
    print("No")
    exit()

n = len(s_fh)

if not s_fh[:n//2] == s_fh[n//2+1:][::-1] or not s_lh_r[:n//2] == s_lh_r[n//2+1:][::-1]:
    print("No")
    exit()

print("Yes")
S = input()
N = len(S)
left = S[:N // 2]
right = S[N // 2 + 1:]

print('Yes') if left == left[::-1] and right == right[::-1] else print('No')
def isPalindrome(s):
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    return front == back[::-1]


s = input()

sResult = isPalindrome(s)

if not sResult:
    print("No")
else:
    n = len(s)
    front = s[0:int((n-1)/2)]
    back = s[int((n+1)/2):]
    fResult = isPalindrome(front)
    bResult = isPalindrome(back)
    if fResult and bResult:
        print("Yes")
    else:
        print("No")
s = input()

n = len(s)

if (n//2) % 2 == 0 or n == 3:
    print("No")
    exit()

t = 0
for i in range(n//2):
    if s[i] != s[-i-1]:
        print("No")
        exit()

for j in range((n//2) // 2):
    if s[j] != s[-j-(n//2)-2]:
        print("No")
        exit()

for j in range((n//2) // 2):
    if s[j+(n//2)+1] != s[-j-1]:
        print("No")
        exit()

print("Yes")
inp = input()
part1 = inp[0:int((len(inp)-1)/2)]
part2 = inp[int((len(inp)+1)/2):]


def isParin(S):
    n = len(S)
    flg = 0
    for i in range(int(n/2)):
        if S[i] != S[n-1-i]:
            flg += 1
    if flg == 0:
        return True
    else:
        return False


if isParin(inp):
    if isParin(part1) and isParin(part2):
        print('Yes')
    else:
        print('No')
S = input()
l = len(S)

count = 0
harf = int(l/2)
a = S[:harf]
b = S[harf+1:][::-1]

if a == b :
    count+=1

quarter = int(l/2) - 1
a1 = a[:quarter-1]
a2 = a[quarter][::-1]

if a1==a2:
    count+=1

b1 = b[:quarter-1]
b2 = b[quarter][::-1]

if b1 == b2:
    count+=1

if count == 3:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
for i in range(N//2):
    if S[i] != S[-i-1]:
        print('No')
        exit()
if N % 2 == 0 or N < 7:
    print('No')
    exit()

for i in range((N-1)//2):
    if S[i] != S[-i-1]:
        print('No')
        exit()

for i in range((N+3)//2):
    if S[i] != S[-i-1]:
        print('No')
        exit()
print('Yes')
s=input()
n=len(s)
s1=s[(n-1)//2]
flag=0
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

s1=s[(n+3)//2-1]
for i in range(len(s1)//2):
    if(s1[i]!=s1[-1-i]):
        flag=1
        break

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

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

s = [c for c in s]

left = s[:len(s)//2]
right = s[len(s)//2+1:]

def check(s):
    left = []
    right = []

    while len(s)>1:
        left.append(s.pop(0))
        right.append(s.pop())
    
    if left==right:
        return True
    else:
        return False

if check(left)==True and check(right)==True and left==right:
    print('Yes')
else:
    print('No')
S = list(input())
N = len(S)
flag = 1

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


for i in range(int((N-1)/2)):
  if S1[i] != S1[len(S1)-i-1]:
    flag = 0
  if S2[i] != S2[len(S2)-i-1]:
    flag = 0
    
if flag == 1:
  print('Yes')
else:
  print('No')
#!/usr/bin/env python3

S = input()
n = len(S)

f = 0

if S == S[::-1]:
    L = S[:int((n-1)/2)]
    R = S[int((n+1)/2):]
    if len(L) == 1:
        print('Yes')
    elif L == L[::-1] and R == R[::-1]:
        print('Yes')
        f = 1
if f ==0:
    print('No')
s = str(input())
n = len(s)
s1 = s[:int((n-1)/2)]
s2 = s[int((n+3)/2)-1:]


i = 1
while i < len(s):
    if not s[i-1] == s[-i]:
        print("No")
        exit()
    i += 1
while i < len(s1):
    if not s1[i-1] == s1[-i]:
        print("No")
        exit()
    i += 1
while i < len(s2):
    if not s2[i+2] == s2[-i]:
        print("No")
        exit()
    i += 1
print("Yes")
S = input()
N = len(S)
s = S[::-1]

if S != s:
    print('No')
    exit()

if (S[:(N-1)//2]) != (s[:((N-1)//2)]):
    print('No')
    exit()

if S[((N+3)//2)-1:] != s[((N+3)//2)-1:]:
    print('No')
    exit()

print('Yes')
def palindrome(s):
    return s == "".join(list(reversed(s)))

S = input()
N = len(S)

s1 = S[:(N-1)//2]
s2 = S[(N+1)//2:]
print("Yes" if palindrome(s1) and palindrome(s2) else "No")
word=list(input())
word_number=len(word)

if word_number>=7:
    for i in range(int(word_number/2)):
        if word[i]==word[-i-1]:
            result='Yes'
            continue
        else:
            result='No'
            break

        result='Yes'
else:
    result='No'

print(result)
#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	S = input()
	N = len(S)
	judge = "Yes"
	s = int((N - 3) // 2)
	t = int((N + 1) // 2)
	for i in range(int((N - 1) // 2)):
		if S[i] != S[s - i]:
			judge = "No"
		if S[t + i] != S[N - 1 - i]:
			judge = "No"

	print(judge)

if __name__ == '__main__':
	main()
S = list(input())
N = len(S)

def cal(a,b):
    for i in range((b-a+1)//2):
        if S[a+i] != S[b-i]:
            return 1
            break
    else:
        return 0
if cal(0,N-3//2) == 0 and cal(N+1//2,N-1) == 0 and cal(0,N-1) == 0:
    print("Yes")
else:
    print("No")
def main():
    S = input()
    N = len(S)
    P = S[:(N-1)//2]
    Q = S[(N+3)//2 - 1:]
    if (P[:len(P)//2] == P[len(P)//2 + 1:]) and (Q[:len(Q)//2] == Q[len(Q)//2 + 1:]):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
List=list(input())
N=len(List)
if N%4==3 and 0 not in [int(List[i]==List[(N-3)//2-i]) for i in range((N-1)//2)]\
and List[0:(N-3)//2]==List[(N+1)//2:N-1]:
    print("Yes")
else:
  print("No")
S = input()

def judge(x):
  if reversed(x) == x and x[0] == x[2] and x[-3] == x[-1]:
    return "Yes"
  else:
    return "No"
  
print(judge(S))
s = input()
n = len(s)

if s[:(n-1)//2] == ''.join(reversed(s[:(n-1)//2])) and s[((n+3)//2-1):] == ''.join(reversed(s[((n+3)//2-1):])):
  print("Yes")
else:
  print("No")
##B
S = str(input())
N = int(len(S))
##print(N)
S1 = S[0:(N-1)//2]
N1 = len(S1)
S2 = S[(N+3)//2-1:N]
N2 = len(S2)

if S1 == S2:
    if S1[0:(N1-1)//2] == S1[(N1+3)//2-1:N1]:
        if S2[0:(N2-1)//2] == S2[(N2+3)//2-1:N2]:
            print("Yes")
else:
    print("No")
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
for i in range(a//2):
  if s[i]!=s[a-1-i]:
    count+=1
    
for i in range((n-b+1)//2):
  if s[-(i+1)]!=s[b-1-i]:
    count+=1
    
if count!=0:
  print('No')
else:
  print('Yes')
import math
S=input()
N=len(S)
S1=S[0:math.floor((N-1)/2)]
S2=S[math.floor((N+3)/2)-1:N]
if S1==S1[::-1]:
  if S2==S2[::-1]:
    print('Yes')
  else:
    print('No')
else:
  print('No')
import sys
input = lambda: sys.stdin.readline().rstrip()

S = input()

N = len(S)

S_left = S[:(N-1)//2]
S_right = S[(N+1)//2:]


def ch_kaibun(s):
    if not s:
        return True

    if len(s) % 2 == 0:
        return False 

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


if ch_kaibun(S) and ch_kaibun(S_left) and ch_kaibun(S_right):
    print("Yes")
else:
    print("No")
st=input()
n=len(st)
if(n%2==0):
	print("No")
	exit(0)
if(st==st[::-1]):
	s1=""
	for i in range((n-1)//2+1):
		s1+=st[i]
	s2=""
	for i in range((n+3)//2,n):
		s2+=st[i]
	if(s1==s1[::-1] and s2==s2[::-1]):
		print("Yes")
	else:
		print("No")
else:
	print("No")
# B - String Palindrome

S = input()

ans = 'No'

N = len(S)
left1 = S[:(N - 1) // 2]
right1 = S[((N + 3) // 2) - 1:]
if left1 == right1:
    N = len(left1)
    left2 = left1[:(N - 1) // 2]
    right2 = left1[((N + 3) // 2) - 1:]
    if 1 < N and left2 == right2:
        N = len(right1)
        left3 = right1[:(N - 1) // 2]
        right3 = right1[((N + 3) // 2) - 1:]
        if 1 < N and left3 == right3:
            ans = 'Yes'

print(ans)
S = input()
N = int(len(S))
A = "Yes"
n = N//2
m = n//2

for i in range(n):
  if S[i] != S[N-1-i]:
    A = "No"
    break
for i in range(m):
  if S[i] != S[m-1-i] or S[n+1+i] != S[N-1-i]:
    A = "No"
    break
print(A)
S=input()
N=len(S)
M=N//2
def kaibun(x):
    n=len(x)
    m=n//2
    if x[:m]==x[m+1:][::-1]:
        return True
    else:
        return False
if all([kaibun(S),kaibun(S[:M])]):
    print("Yes")
else:
    print("No")
s = "atcoder"
l = len(s)
s1 = s[:int((l-1)/2)]
s2 = s[int((l+3)/2) - 1:]
if (s1 == s1[::-1]) and (s2 == s2[::-1]):
    print("Yes")
else :
    print("No")
print(s1,s2)
s = input()
n = len(s)
top = s[:n//2]
under = s[n//2+1:n]

if s == s[::-1]:
  if top == top[::-1]:
    if under == under[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
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]:
  print("Yes")
else:
  print("No")
def is_kaibun(string):
    isk = True
    length = len(string)
    for i in range(length // 2):
        if string[i] != string[length - 1 - i]:
            isk = False
            break
    return isk

s = input()
len_s = len(s)
if is_kaibun(s[0:(len_s // 2)]) and is_kaibun(s[(len_s // 2) + 1:len_s]):
    print('Yes')
else:
    print('No')
s = input()
n = len(s)


def f(s):
    n = len(s)
    if n % 2 == 0:
        return s[:n // 2] == s[n // 2:]
    else:
        return s[:n // 2] == s[n // 2 + 1:]


if f(s) and f(s[:(n - 1)//2 + 1]) and f(s[(n + 3) // 2 - 1:]):
    print('Yes')
else:
    print('No')
def kaibun(x):
  for i in range(int(len(x)/2)):
    if(x[i] != x[(-1) - i]):
      return 0

  return 1

def main():
  s = input()
  s_num = len(s)

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[int((s_num + 3)/2 - 1):s_num])

  if(num1 == 1 and num2 == 1):
    print('Yes')
  else:
    print('No')
if __name__ == '__main__':
  main()
import math
s = input()
n = len(s)
zen_c = 0
kou_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
kou_l = len(kouhan)-1
for i in range(0, zen_l):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    zen_c = 1
for i in range(0, kou_l):
  if kouhan[i] == kouhan[kou_l-i]:
    kou_c = 1
print('Yes' if zen_c == 1 and kou_c == 1 else 'No')
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    if len(mojiretu) % 2 == 0:
        return mojiretu[0:mid+1] == mojiretu[mid+1:]
    else:
        return mojiretu[0:mid] == mojiretu[mid+1:]

def fin():
    print('No')
    quit()

input_line = input()
if not kaibun(input_line):
    fin()

N = len(input_line)

if not kaibun(input_line[0:(N-1)//2]):
    fin()


print('Yes')
s = input()


s1 = s[0:len(s)//2]
s2 = s[len(s)//2+1:len(s)]

print(s1, s2)
def reverse(s): 
    return s[::-1]

def isPalindrome(s): 
    rev = reverse(s) 
  
    if (s == rev): 
        return True
    return False

if isPalindrome(s1):
    if isPalindrome(s2):
        if s1==s2:
            print("Yes")
else:
    print("No")
s = input()
N = len(s)

s_first = s[0:(N-1)//2]
s_second = s[(N+1)//2:]

for i in range(len(s_first)):
    if(s_first[i] != s_first[::-1][i] or s_second[i] != s_second[::-1][i]):
        print("No")
        break
else:
    print("Yes")
def partpall(s,n):
	if s!=s[::-1]:
		return False
	else:
		return True

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


# s=input("enter:")
s="akakaka"
# print("sucess",s,s[::-1])
# revStr=s[::-1]
n=len(s)
print(n)
if pall(s,n):
	print("True")
else:
	print("False")
def kaibun(x):
  if(x != ''.join(list(reversed(x)))):
    return 0
  else:
    return 1

def main():
  s = input()
  s_num = len(s)

  num1 = kaibun(s[:int((s_num - 1)/2)])
  num2 = kaibun(s[(int((s_num + 1)/2)):s_num])

  if(num1 == 1 and num2 == 1):
    if(s == ''.join(list(reversed(s)))):
      print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  main()
import sys
s = str(input())

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

for i in range(len(s1)//2):
    if s1[i] != s1[-1-i] or s2[i] != s2[-1-i]:
        print("No")
        sys.exit()

print("Yes")
s = input()
n = len(s)
for i in range((n//2)):
  if(s[i] != s[-(i+1)]):
    print("No")
    exit()
for i in range(((n//2)//2)):
  print(s[i],s[((n//2)-1)-i])
  if((s[i] != s[((n//2)-1)-i]) and s[((n+3)/2) != s[-(i+1)]]):
    print("No")
    exit()
print("Yes")
ans = "Yes"
s = input()
if s != s[::-1]: # スライスというやつ
  ans = "No"
n = len(s) // 2
if s[:n] != s[0:n:-1]:
  ans = "No"
print(ans)
s = input()

flag = True
n = len(s)
for i in range(n//4):
  if s[i] == s[(n-1)//2 -1 - i] == s[(n+3)//2 -1 + i] == s[n-1 - i]:
    break
  else:
    flag = False

if flag == True:
  print('Yes')
else:
  print('No')
s=list(input())
n=len(s)
if s[::1] == s[::-1] and s[:((n-1)//2):1]==s[:((n-1)//2):-1] and s[((n+3)//2)-1:n:1]==s[((n+3)//2)-1:n:-1]:
    print('Yes')
else:
    print('No')
import copy

S = input()
flag_fail = 0
N = len(S)

while N != 1:
  S_temp = copy.copy(S)
  N = len(S)
  K = N // 2
  if N == 2:
    break
  else:
    for i in range(K):
      if S_temp[i] != S_temp[N - i - 1]:
        flag_fail = 3
        break
        
  if flag_fail != 0:
    print('No')
    break
  else:
    S = []
    S = S_temp[0:K]
if flag_fail == 0:
  print('Yes')
s = input()

N = len(s)
if s==s[::-1] and s[:(N-1)//2]==s[:(N-1)//2][::-1] \
                            and s[(N+3)//2:N]==s[(N+3)//2:N][::-1]:
    print("Yes")
else:
    print("No")
s = input()
c= 0
for i in range((len(s)-1)//2):
    if (s[i] != s[(len(s)-1)//2-i-1]) or (s[(len(s)-1)//2+i+1] != s[len(s)-i-1]):
        c = 0
        break
    else:
        c +=1

if c ==(len(s)-1)//2:
    print("Yes")
else:
    print("No")
#!/usr/bin/env python3
s = input()
n = len(s)
pre = s[:(n-1)//2]
suf = s[(n+3)//2-1:]
if pre == pre[::-1] and suf == suf[::-1]:
    print("Yes")
else: print("No")
s = input()

s = list(s)

ans = True

fs = 0
sl = -1
fl = (len(s) - 1) // 2
ss = (len(s) + 3) // 2
for i in range(fl // 2):
    if s[fs+i] == s[fl-i] and s[fl-i] == s[ss+i] and s[ss+i] == s[sl-i]:
        pass
    else:
        ans = False
        break

if ans:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-


def rli():
    return list(map(int, input().split()))


def check2(s):
    l = len(s) // 2
    if s[:l] != s[:l:-1]:
        return False
    return True


def check(s):
    l = len(s) // 2
    if s[:l] != s[:l:-1]:
        return False
    if check2(s[:l]) and check2(s[l+1:]):
        return  True
    return False


def main():
    s = input()
    if check(s):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
def is_kaibun(s):
    if len(s) % 2 == 1:
        for i in range(int((len(s) + 1) / 2)):
            if s[i] != s[-(i + 1)]:
                return False
            return True

s = input()
result = is_kaibun(s) and is_kaibun(s[:int((len(s) - 1) / 2)]) and is_kaibun(s[int(((len(s) + 3) / 2) - 1):])
print('Yes' if result else 'No')
S = input()
N = len(S)
print("Yes" if S[:(N-1)//2]==S[:(N-1)//2][::-1]else "No")
s=list(input())
if s==s[::-1]:
  n=len(s)
  if s[:n//2-1]==s[:n//2-1:-1]:
    if s[n//2+1:]==s[n//2+1::-1]:
      print("Yes")
      exit()
print("No")
import sys
def is_pal(s):
    i,j=0,len(s)-1
    while i<=j:
        if s[i]==s[j]:
            i+=1
            j-=1
        else:
            return False
    return True
s=sys.stdin.readline()[:-1]
n=len(s)
if n%2!=0:
    if is_pal(s[:n//2]) and is_pal(s[n//2+1:]):
        print('Yes')
    else:
        print('No')
else:
    print('No')
S = input()
N = len(S)
S = list(S)
a = S[:(N-1)//2]
b = S[(N+1)//2:]
ar = a[::-1]
br = b[::-1]
if a==ar and b == br:
    print('Yes')
else:
    print('No')
s=input();print('YNeos'[s[:2]!=s[-2:]::2])
s = input()
if len(s) / 2 == 0:
    print("No")
    exit()

def check(i):
    if len(i) / 2 != 0:
        i2 = i[len(i) // 2 + 1:len(i)]
    else:
        i2 = i[len(i) // 2:len(i)]
    if i[0:len(i) // 2] == i2[::-1] or len(i2) == 1:
        return(True)
    return(False)

s2 = s[0:(len(s) - 1) // 2]
s3 = s[(len(s) - 1) // 2 + 1:len(s)]

if check(s) == True and check(s2) == True and check(s3) == True:
    print("Yes")
else:
    print("No")
s = input()
n = len(s)
mid = n//2

ans = 'No'

if s[:mid] == s[mid+1:]:
    q = s[:mid]
    q_mid = len(q)//2

    t = s[mid+1:]
    t_mid = len(t)//2

    if q[:q_mid] == q[q_mid+1:] and t[:t_mid] == t[t_mid+1:]:
        ans = 'Yes'

print(ans)
S=input()
for i in range(len(S)//4):
    print(i)
    if not S[i]==S[-i-len(S)//2-2]==S[i+len(S)//2+1]==S[-i-1]:
        exit()
print("Yes")
import math
s = input()
n = len(s)
zen_c = 0
kou_c = 0
z = math.floor((n-1)/2)
k = math.floor((n+2)/2)
zenhan = s[0:z]
kouhan = s[k:n]
zen_l = len(zenhan)-1
kou_l = len(kouhan)-1
for i in range(0, zen_l):
  if zenhan[i] == zenhan[zen_l-i] and i != (zen_l-i):
    zen_c = 1
for i in range(0, kou_l):
  if kouhan[i] == kouhan[kou_l-i]:
    kou_c = 1
if zenhan == kouhan:
  print('Yes' if zen_c == 1 and kou_c == 1 else 'No')
else:
  print('No')
S = input()


def is_palindrome(s):
    N = len(s)
    half = N // 2
    f = s[:half]
    r = s[-half:][::-1]
    return f == r


if is_palindrome(S) and is_palindrome(S[: (len(S) - 1) // 2]):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)#7
a = 0
f = (N-1)//2
for i in range(f):
    if S[i] !=S[f-i-1]:
        a = 1
b = 0
for j in range((N+3)//2-1,N):
    b += 1
    if S[j] != S[N-b]:
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")
s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if len(s)==3:
    if s[0]==s[2]:
        flag=1
else:
    if sd==s[z+1:len(s)-1]:
        if sd==sd[::-1]:
            flag=1
if flag==1:
    print("Yes")
else:
    print("No")
S=str(input())
N=len(S)
M=int((N-1)/2)
sum=0
for i in range(M):
    if S[i]==S[M-i-1]:
        sum += 1
for i in range(M+1,N):
    if S[i]==S[M-i]:
        sum += 1
if sum==(N-1):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
a = S[0:(N-1)//2]
b = S[(N+3)//2-1:]

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

print(kaibun(S))
print(a)
print(kaibun(a))
print(b)
print(kaibun(b))
  
if kaibun(S) & kaibun(a) & kaibun(b):
    print("Yes")
else:
    print("No")
s = str(input())

ans = 0

def kaibun(tex):
  n = len(tex)
  before = tex[0:int((n-1)/2)]
  after = tex[int((n+3)/2-1):]
  if before == before[::-1] and after == after[::-1]:
    return 1
  else:
    return 0

ans += kaibun(s)

before = s[0:int((len(s)-1)/2)]
after = s[int((len(s)+3)/2-1):]

if ans == 1 and after == after[::-1] and before == before[::-1]:
  print('Yes')
else:
  print('No')
S = input()

N = len(S)

be = []
af = []

for i in range(N//2):
    be.append(S[i])
    af.append(S[i+N//2+1])
    
re_be = list(reversed(be))
re_af = list(reversed(af))

count = 0
    
for i in range(N//2):
    if be[i] == re_be[i] and af[i] == re_af[i]:
        count+=1
        
if count == N//2:
    print("Yes")
else:
    print("No")
def palindrome(s):
    n = len(s)
    f = True
    for i in range(n//2):
        if s[i] != s[-(i+1)]:
            f = False
            break
    return f

S = input()
N = len(S)

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

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

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

print(result)
S=list(input())
N=len(S)

def circle_judge(S,N):
	circle=True
	for n in range((N-1)//2):
		if S[n]!=S[N-1-n]:
			circle=False
			break
	return circle

def main():
	circle=circle_judge(S,N)
	if circle==True:
		S_h=S[:(N-1)//2]
		if len(S_h)%2==0:
			circle=False
		else:
			circle=circle_judge(S_h,(N-1)//2)
	return circle

result=main()
if result==True:
	print('Yes')
elif result==False:
	print('No')
S = input()
first = S[0:int((len(S) - 1) / 2)]
second= S[-1 * int((len(S) - 1) / 2):]

if first == first[::-1] and second == second[::-1]:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
left = S[:N // 2]
right = S[N // 2 + 1:]
last = S[(N+3)//2-1:]

print('Yes') if left == left[::-1] and right == right[::-1] and last == last[::-1] else print('No')
S = str(input())
def palindrome(string): 
    return True if string==string[::-1] else False

ans = "No"
if palindrome(S) and palindrome(S[:(len(S)-1)//2]) and palindrome(S[(len(S)+3)//2 + 1:]):
    if (len(S)+3)%2 == 0:
        ans = "Yes"

print("No")
s = input()
def is_palindrome(s):
    return s == s[::-1]

s_len = len(s)
if is_palindrome(s):
    print(s[:(s_len-1)//2])
    if is_palindrome(s[:(s_len-1)//2]):    
        print(s[(s_len+3)//2-1:])
        if is_palindrome(s[(s_len+3)//2-1:]):
            print("Yes")
else:
    print("No")
s = input()
n = len(s)
for i in range(n//4):
    if s[i] != s[n//2-1]:
        print('NO')
        break
else:
    if s[:n//2] == s[n//2+1:]:
        print('YES')
    else:
        print('NO')
s = input()

n = len(s)

if n == 3:
    if s[0] == s[2]:
        print("Yes")
    else:
        print("No")
    exit()

l = s[:int((n-1)/2)]
r = s[int((n+1)/2):]


if l != r:
    print("No")
    exit()
ll = l[:int((len(l)-1)/2)]
lr = l[int((len(l)+1)/2):]

if ll != lr:
    print("No")
    exit()

rl = r[:int((len(l)-1)/2)]
rr = r[int((len(l)+1)/2):]

if rl != rr:
    print("No")
    exit()

print("Yes")
S=input()
K1=int((len(S)-1)/2)
K2=int((K1-1)/2)
K3=int((len(S)+3)/2)

#1
S_K1=S[:K1]
S_K1_r=S[:K1:-1]

#2
S_K2=S_K1[:K2]
S_K2_r=S_K1[:K2:-1]

#3
S_K3=S[K3-1:]
num3=int((len(S_K3)-1)/2)
S_K4=S_K3[:num3]
S_K4_r=S_K3[:num3:-1]

if S_K1==S_K1_r and S_K2==S_K2_r and S_K4 == S_K4_r:
  print('Yes')
else:
  print('No')
S = input()
N = len(S)
a = S[1:(N-1)//2]
b = S[(N+3)//2:]

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

  
if kaibun(S) & kaibun(a) & kaibun(b):
    print("Yes")
else:
    print("No")