peterverebics/CodeNet_Python_118 huggingface dataset:
s = list(input())
n = len(s)
def circular(a):
    n = len(a)
    bool = False
    for i in range(int(n/2)):
        if a[i] != a[n - 1 - i]:
            bool = False
            break
        bool = True
    return bool
ans = circular(s[0:int((n - 1) / 2)]) and circular(s[int((n + 3) / 2) - 1:n])
if ans:
    print('Yes')
else:
    print('No')
N = str(input())
lenN = len(N)

fN =N[0:(lenN - 1)//2]
lN =N[(lenN + 3)//2-1:]
print(("No","Yes")[(0,1)[fN == fN[-1::-1]]*(0,1)[lN == lN[-1::-1]]])
def isPalindrome(s): 
      
    # Using predefined function to  
    # reverse to string print(s) 
    rev = ''.join(reversed(s)) 
  
    # Checking if both string are  
    # equal or not 
    if (s == rev): 
        return True
    return False
  
# main function 
s = input()
ans = isPalindrome(s) 
  
if (ans): 
    print("Yes") 
else: 
    print("No")
s = input()
n = len(s)
cen1 = int((n-1)/2)
cen2 = int((n+3)/2)
if s[:cen1] == s[cen1-1::-1] and s[cen2-1:n] == s[n:cen2-2:-1]:
    print('Yes')
else:
    print('No')
S = input()
Sb = S[::-1]
if S == Sb:
    if S[0:(len(S)-1)//2] == S[(len(S)+3)//2 -1:len(S)+1]:
        print("Yes")
else:
    print("No")
S=input()
n=len(S)
if  S[0:int((n-1)/2)]== ''.join(list(reversed(S[0:int((n-1)/2)]))) and S[int((n+1)/2):n]==''.join(list(reversed(S[int((n+1)/2):(n)]))):
    print('Yes')
else:
    print('No')
a=input()
b=0
c=0
d=0
if len(a)==3:
  print("Yes")
else:
  for i in range((len(a)-1)//4):
    if a[i]!=a[int((len(a)//2)-i)]:
      c=c+1
    if a[int((len(a)//2)+1+i)]!=a[-i]:
      c=c+1
  if c==0:
    print("Yes")
  else:
    print("No")
s = input()
a = len(s)
b_s = s[::-1]

n_s = s[:3]
nn_s = n_s[::-1]

n_b = b_s[:3]
nn_b = n_b[::-1]
if n_b == nn_b and n_s == nn_s:
    print("Yes")
else:
    print("No")
s = list(input())
x = len(s)
a = s[:x//2]
b = s[x//2+1:]
b.reverse()
y = len(a)
c = a[:y//2]
d = a[y//2+1:]
d.reverse()
e = b[y//2+1:]
e.reverse()
f = b[:y//2]

ans = "No"
if (x+1)%4 == 0:
    if a == b:
        if c == d:
            if a == b:
                ans = "Yes"

print(ans)
S =list(str(input()))
S1=S[0:int(((len(S)-1)/2))]
S2=S[int(((len(S)+3)/2)-1):len(S)+1]


if S1==list(reversed(S1)) and S2==list(reversed(S2)):
    print("Yes")
else:
    print("No")
S = str(input())
def palindrome(string): 
    return True if string==string[::-1] else False

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

if s == reversed(s) and ps1 == reversed(ps1) and ps2 == reversed(ps2):
    print("Yes")
else :
    print("No")
def main(S):
    N = len(S)
    if N % 2 == 0:
        if S == S[::-1]:
            return True
        else:
            return False
    elif S == S[::-1] and main(S[:((N - 1) // 2)]) == True and main(S[((N + 1) // 2):]) == True:
        return True
    else:
        return False
S = list(input())
if main(S) == True:
    print('Yes')
else:
    print('No')
def kaibun(s):
  l=len(s)
  if(l%2==0):
    for i in range(l//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1
  else:
    for i in range((l-1)//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1

s=input()
l=len(s)
if(l%2==0):
  print("No")
else:
  if(kaibun(s[:((l-1)//2)])*kaibun(s)*kaibun(s[((l+1)//2):])):
    print("Yes")
import sys
s = input()
for i in range((len(s) - 1)//4):
    if s[i] != s[(len(s) - 1)//2 - i - 1]:
        print("No")
        sys.exit(0)
print("Yes")
string = input()

middle=len(string)//2

def isPal(string):
    return string==string[::-1]

if isPal(string):
    if isPal(string[:middle]):
        print(True)
    else:
        print(False)
else:
    print(False)
S = input()

count = 0
first =S[len(S)//2+1:]
if S[:len(S)//2] != first[::-1]:
    count +=1

second = S[len(S)//4+1:len(S)//2]
if S[:len(S)//4] != second[::-1]: 
    count +=1

third = S[len(S)//2+1+len(S)//4+1:]
if S[len(S)//2+1:len(S)//2+len(S)//4+1] != third[::-1]: 
    count +=1

    
if count ==0:
    print('Yes')
else:
    print('No')
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
print(S1,S2)
if S1==S2 and S1==S1[::-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')
        f == 1
    elif L == L[::-1] and R == R[::-1]:
        print('Yes')
        f = 1
if f ==0:
    print('No')
s=input()
l=list(s)
if reversed(l)!=l:
  print('No')
  exit()

p=l[0:(n+1)/2]
q=l[(n+3)/2:]
if reversed(p)!=p or reversed(q)!=q:
  print('No')
  exit()
  
print('Yes')
S = input()
N = len(S)

def kaibun(S, N):
  if N == 1:
    return True
  s1 = S[:(N-1)//2]
  s2 = S[(N+1)//2:]
  n = len(s1)
  if s1 == s2:
    return kaibun(s1, n)
  else:
    return False

if kaibun(S, N):
  print('Yes')
else:
  print('No')
#!/usr/bin/env python3

S = input()
N = len(S)
a = S[: int((N - 1) / 2)]
b = S[int((N + 3) / 2) - 1 :]
ans = "Yes" if a == a[::-1] and b == b[::-1] else "No"

print(ans)
s = list(input())
d = int((len(s)-1) / 2)
e = int((len(s)+3) / 2)
if s == s[::-1] and s[0:d-1] == s[0:d-1:-1] and s[e-1:] == s[e-1::-1]:
  print('Yes')
else:
  print('No')
S = input()
N = len(S)
def ispalindrome(string): return True if string==string[::-1] else False

S1=S[0:(N-1)//2]
S2=S[-1+(N+3)//2:N]
print(ispalindrome(S1))
if ispalindrome(S) and ispalindrome(S1) and ispalindrome(S2):
    print("Yes")
else:
    print("No")
S = input()
S_rvs = S[::-1]
N = len(S)
left = int((N-1)/2-1)
right = int((N+3)/2-1)

match = True
if not(S == S_rvs):
    match = False
elif not(S[:left] == S_rvs[right:]):
    match = False
elif not(S[right:] == S_rvs[:left]):
    match = False

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

rs = s[::-1]


if s == rs:
  n = (len(s) -1 )//2
  nn = (len(s) +3 )//2

  ss = s[:n]
  rss = ss[::-1]
  sss = s[nn:]
  rsss = sss[::-1]
  if ss == rss and sss == rsss:
    print("Yes")
  else:
    print("No")

else:
  print("No")
ans = "Yes"
s = input()
if s != s[::-1]: # スライスというやつ
  ans = "No"
n = len(s) // 2
if s[:n] != s[:n:-1]:
  ans = "No"
print(ans)
def checkKaibun(str):
    for i in range(int((len(str) - 1) / 2)):
        if str[i] != str[-i - 1]:
            return False
    return True

s = input()
n = len(s)
c2e = int((n - 1) / 2 - 1)
c3s = int((n - 1) / 2 + 1)
if not checkKaibun(s):
    print('No')
elif not checkKaibun(s[1:c2e]):
    print('No')
elif not checkKaibun(s[c3s:n]):
    print('No')
else:
    print('Yes')
s=input();print('YNeos'[s[:4]!=s[-4:]::2])
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 = int(len(s) * 0.5 - 1.5)
index = int((n + 3) /2 -1 )
for i in range(num):
  if s[index+i] != s[n-1-i]:
    print("%c %c" %(s[index+i],s[n-1-i]))
    print("No")
    exit()
   
  
print("Yes")
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
s = input()
r = s[::-1]

if len(s)%4 == 3:
    if s==r:
        print("Yes")
    else:
        print("No")

else :
    print("No")
S = input()
 
def kaibunn_boolean(s):
  return s == s[::-1]
 
ans = False
 
if kaibunn_boolean(S) and kaibunn_boolean(S[:3]) and kaibunn_boolean(S[-3:]):
  ans = kaibunn_boolean(S)
 
if ans:
  print('Yes')
else:
  print('No')
def is_palin(s):
    rs = s[::-1]
    for i,j in zip(s, rs):
        if i != j:
            return False
    return True

S = input().strip()
N = len(S)

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

if is_palin(s1) and is_palin(s2):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)


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

if S1 == S1[::-1] and S2 == S2[::-1]:
    print("Yes")
else:print("No")
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)
"""
moji = input()
n=len(moji)
mae=moji[0:(n-1)//2]
ato=moji[(n+3)//2-1:n]
mae0 = mae[::-1]
ato0 = ato[::-1]
if ((mae == mae0) and (ato == ato0)):
  print('Yes')
else:
  print('No')
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())

    right.reverse()
    
    if left==right:
        return True
    else:
        return False

if check(left)==True and check(right)==True and check(s)==True:
    print('Yes')
else:
    print('No')
str = input()
resp = True
for i in range(0, int(len(str) / 2)):
    if str[i] != str[len(str) - i - 1]:
        resp = False
        break
print(resp)
S = input()

def kaibun(S):
    def bun(s):
        return s == ''.join(list(reversed(s)))

    def kaibun0(s): 
        N = len(s)
        if N <= 3:
            return bun(s)
        A = (N - 1) / 2
        B = (N + 3) / 2
        return kaibun0(s[0:int(A)]) and kaibun0(s[int(B)-1:N])
    
    return kaibun0(S)

print(kaibun(S))
def isKaibun(ss):
    if len(ss)%2==0:
        return False
    for i in range((len(ss)-1)//2+1):
        if ss[i]!=ss[-i-1]:
            return False
    return True

s = input()

n=len(s)

if isKaibun(s) and isKaibun(s[:(n-1)//2]) and isKaibun(s[(n+1)//2:]):
    print("Yes")
else:
    print("No")
S=list(str(input()))

N=len(S)

S_left=[S[i] for i in range((N-1)//2)]
S_right=[S[i] for i in range((N+2)//2,N)]

def kaibun(X):
    count=0
    for i in range(len(X)//2):
        if S[i]==S[len(X)-1-i]:
            count+=1
    if count==len(X)//2:
        return 1
    else:
        return 0
        
print("Yes" if kaibun(S_left)*kaibun(S_right)==1 else "No")
def isPalindrome(s):
    for i in range(len(s) // 2):
        if s[i] != s[len(s) - i - 1]:
            return False
    return True


s = input()
N = len(s)

print("Yes" if isPalindrome(s[:(N - 1) // 2]) and isPalindrome(s[(N + 3) // 2 - 1:]) else "No")
s = input()
l = len(s)
c = (l-1)//2

count = 0
check = 0
for i in range(0,c-1):
  if s[i] == s[l-i-1]:
    count = count + 1
    
if count == c-1:
  check = check + 1

count1 = 0  
for j in range(0, c-1):
  if s[j] == s[c-j-1]:
    count1 = count1 + 1

if count1 == c-1:
  check = check + 1

print(check)
if check == 2:
  print('Yes')
else:
  print('No')
S = list(input())
N = len(S)
hn = int((N-1)/2)
for i in range(hn//2):
  if S[i] != S[hn-1-i]:
    print('No')
    exit()
for i in range(hn//2):
  if S[hn+1+i] != S[N-1-i]:
    print('No')
    exit()
print('Yes')
S = input()
length = len(S)

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

first = S[:(length - 1) // 2]
second = S[(length + 1) // 2:]
#print(first)
#print(second)

if check_palin(first) == True and check_palin(second) == True:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)

def kaibun(S, N):
  if N == 1:
    return True
  if N%2 != 0:
    s1 = S[:(N-1)//2]
    s2 = S[(N+1)//2:]
  else:
    s1 = S[:N//2]
    s2 = S[N//2:]
  n = len(s1)
  if s1 == s2:
    return kaibun(s1, n)
  else:
    return False

if kaibun(S, N):
  print('Yes')
else:
  print('No')
# coding: utf-8
S = input()
flag = True
cnt = 0
if len(S) % 2 == 1:
    cnt += 1
if S[:len(S)//2] != S[len(S)//2 + cnt:]:
    flag = False
# print(S[:len(S)//2], S[len(S)//2+1:])
s = S[:len(S)//2]
# print(s)
if s[:len(s)//2] != s[len(s)//2 + cnt:]:
    flag = False
s = S[(len(S)+3)//2-1:]
# print(s)
if s[:len(s)//2] != s[len(s)//2 + cnt:]:
    flag = False
# print(s[:len(s)//2], s[len(s)//2 + cnt:])
print("Yes" if flag else "No")
S = input()
a=''
b=''
c=''
d=''
for i in range(0,int((len(S)-1)/2)):
    a+=S[i]
for i in range(int((len(S)-1)/2)-1,-1,-1):
    b+=S[i]
for j in range(int((len(S)+3)/2)-1,len(S)):
    c+=S[j]
for j in range(len(S)-1,int((len(S)+3)/2)-2,-1):
    d+=S[j]

# print(a)
# print(b)
# print(c)
# print(d)
if a == b and c==d:
    print('Yes')
else:
    print('No')
S = input()


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

front = S[0:int((len(S)-1)//2)]


if check(S) and check(S[0:int((len(S)-1)//2)]) and check(S[(len(S)+3)//2-1:len(S)]):
    print('Yes')
else:
    print('No')
S = list(input())
N = len(S)
for i in range(int((N-1)/2)):
  if S[i] != S[N-1-i]:
    print('No')
    exit()
print('Yes')
S = input()
N = int(len(S))
S_a = S[:(N-1)//2]
S_b = S[(N+3)//2:]
#print(S)
if S == S[::-1] and S_a == S_a[::-1] and S_b == S_b[::-1]:
    print("Yes")
else:
    print("No")
S = input()
if(S==S[::-1]):
      print("Yes")
else:
      print("No")
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
def palin(a):
    if(a==a[::-1]):
        return True
    return False
s=input()
n=len(s)
if(palin(s[:(n-1)//2]) and palin(s[(n+1)//2:])):
    print("Yes")
else:
    print("No")
S = list(input())
print(S)
FS = S[:int((len(S) - 1)/ 2)]
BS = S[int((len(S) + 3) / 2) -1:]

r_S = list(reversed(S))
r_FS = list(reversed(FS))
r_BS = list(reversed(BS))
flag = 0

for i in range(len(S)):
    # print(r_FS, BS)
    if r_S[i] == S[i] and r_FS == FS and r_BS == BS:
        flag = 1

        continue
    else:
        print('No')
        flag = 0
        break
    
if flag == 1:
    print('Yes')
def palindrome(string): return 0 if string==string[::-1] else 1
stri = input()
s = list(stri)
a = len(s)//2
b = s[0:a]
c = s[a+1:]
d = palindrome(b)
e = palindrome(c)
if d==0 and e==0:
    print('Yes')
else:
    print('No')
S = input()
c = True
for i in range (len(S)//2):
  if S[i]==S[len(S)//2-i-1]==S[len(S)//2+1+i]==S[len(S)-i-1]:
    c = True
  else:
    c = False
if (c):
  print('Yes')
else:
  print('No')
import sys
s = input()

n = len(s)
m = int((n-1)/2)
b = s[:m]

for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
m = int((n+3)/2)
b = s[m-1:]
m= len(b)
for i in range(int(m/2)):
    if b[i:(i+1)] != b[(m-i-1):m-i]:
        print('No')
        sys.exit()
print('Yes')
s=input();n=len(s)//2;print('YNeos'[s[:n]+s[-n:]>s[n-1::-1]*2::2])
# coding: utf-8
 
s = input()
n = len(s)
f = 1

ss = s[:(n-1)//2]
for i in range((n-1)//4):
    if not ss[i] == ss[-1*(i+1)]:
        f = 0
        break

ss = s[(n+3)//2-1:]
for i in range((n-1)//4):
    if not ss[i] == ss[-1*(i+1)]:
        f = 0
        break

if f:
    print('Yes')
else:
    print('No')
S = input()
l = len(S) // 2
ll = l // 2
former = S[:l]
latter = S[l+1:]
for i in range(ll):
  if former[i] != former[-i-1] or latter[i] != latter[-i-1]:
    print("No")
    break
else:
  print("Yes")
S = input()
N = len(S)


def rec(i, j):
    if(i >= j):
        return True
    if(S[i] != S[j]):
        return False
    rec(i+1, j-1)
    return True  # 到達しない


ans1 = rec(0, N-1)
ans2 = rec(0, int((N-1)/2)-1)
ans3 = rec(int((N+3)/2)-1, N-1)
if(not(ans1 & ans2 & ans3)):
    print("No")
else:
    print("Yes")
def kaibun(s):
    n = len(s)
    if s[:int((n - 1) / 2)] == s[:int((n + 3) / 2 - 2):-1]:
        return True
    else:
        return False

s = input()
n = len(s)
# print(s[:int((n - 3) / 4)])
# print(s[int((n - 1) / 2 - 1):int((n + 5) / 4 - 2):-1])
# print(s[:int((n - 1) / 2)])
# print(s[:int((n + 3) / 2 - 2):-1])
if kaibun(s) and kaibun(s[:int((n - 1) / 2)]) and kaibun(s[int((n + 3) / 2 - 1):n]):
    print('Yes')
else:
    print('No')
s = input()
n = len(s)
for i in range((n-1)//2):
  if s[i]!=s[(n-1)//2-1-i] or s[i+(n-1)//2+1]!=s[(n-1)-i]:
    print('No')
    exit()
print('Yes')
S = input()
N = len(S)

flag = 0

if S == S[::-1]:
    flag = 1
else:
    flag = 0

tmp = int((N-1)/2)
a = S[:tmp]


if a == a[::-1]:
    flag = 1
else:
    flag = 0

tmp = int((N+3)/2)
b = S[tmp-1 : N]

if b == b[::-1]:
    flag = 1
else:
    flag = 0

if flag:
    print("Yes")
else:
    print("No")
S = input()
if len(S) < 7:
	print("No")
	exit()
for i in range(len(S)//2):
	if S[i] != S[-i-1]:
		print("No")
		exit()
S_front = S[:(len(S)//2)]
print(S_front)
for i in range(len(S_front)//2):
	if S_front[i] != S_front[-i-1]:
		print("No")
		exit()
S_back = S[(len(S)+1)//2:]
print(S_back)
for i in range(len(S_back)//2):
	if S_back[i] != S_back[-i-1]:
		print("No")
		exit()
print("Yes")
S = input()

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

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

if flag == 0:
	print("Yes")
else:
	print("No")
def kaibun(s):
  l=len(s)
  if(l%2==0):
    for i in range(l//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1
  else:
    for i in range((l-1)//2):
      if(s[i]!=s[l-1-i]):
        return 0
    return 1

s=input()
l=len(s)
if(l%2==0):
  print("No")
else:
  if(kaibun(s[:((l-1)//2)])*kaibun(s[((l+1)//2):])):
    print("Yes")
  else:
    print("No")
s = input()
n = len(s)

flag = True
# 回分チェック
if not s[:int(n/2)] == s[int(n/2)+1:]:
    flag = False

# 2チェック
chk = s[0:int((n-1)/2)]
len_ = len(chk)
if not chk[:int(len_/2)] == chk[int(len_/2)+1:]:
    flag = False
# 3チェック
chk = s[int((n+3)/2)-1:n]
len_ = len(chk)
if not chk[:int(len_/2)] == chk[int(len_/2)+1:]:
    flag = False

if flag:
    print('Yes')
else:
    print('No')
def knsu(S):
    N = len(S)
    F = True
    for i in range(N):
        J = N - 1 - i
        if S[i] == S[J]:
            pass
        else:
            F = False
            break

    return F


S = input()
N = len(S)
f1 = knsu(S[:N//2])
f2 = knsu(S[N//2+1:])
if f1 and f2:
    print("Yes")
else:
    print("No")
def kaibun(S):
    lenS = len(S)
#    print()
#    print(S)
#    print(S[:lenS//2])
#    print(S[:(lenS-1)//2:-1])
    if S[:lenS//2] == S[:(lenS-1)//2:-1]:
        return 1
    else:
        return 0
S = input()
lenS = len(S)
if  kaibun(S[:lenS//2]) and kaibun(S[lenS//2+1:]):
    print('Yes')
else:
    print('No')
s = list(input())
s_f = s[0: (len(s) - 1) // 2]
s_b = s[(len(s) + 3) // 2 - 1:len(s)]

if (s != s[::-1]) or (s_f != s_f[::-1]) or (s_b != s_b[::-1]):
    print('No')
else:
    print('Yes')

print(s_f, s_b)
s = list(input())
n = len(s)
n1 = (n-1)//2
n2 = (n+3)//2
s1 = []
s2 = []

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

ans = ""
def kaibun(l,m):
  r = l
  r.reverse()
  x = m
  x.reverse()
  if l == r and m == x:
    ans = 'Yes'
  else:
    ans = 'No'
  return ans
print(kaibun(s1,s2))
import sys
S = input()
N = len(S)
s = S[::-1]

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

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

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

print('Yes')
S = input()

def isKaibun(s):
    l = len(s)
    return s[:l//2] == s[-1:l//2:-1]

if isKaibun(S) and isKaibun(S[:(len(S)-1)//2]) and isKaibun(S[(len(S)+3)//2-1:]):
    print("Yes")
else:
    print("No")
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

S = read_str()

def solve():
    ans = 0
    N = len(S)
    s1 = S[0: (N - 1) // 2]
    s2 = S[(N + 3) // 2 - 1 : N]
    if s1 != s1[::-1]:
        return 'No'
    if s2[::-1] != s2[::-1]:
        return 'No'
    return 'Yes'

if __name__ == "__main__":
    print(solve())
s=input()
n=len(s)
s1=s[:(n-1)//2]
s2=s[(n+3)//2-1:]
print(s1,s2)
if s==s[::1] and s1==s1[::-1] and s2==s2[::-1]:
    print('Yes')
else:
    print('No')
S = list(input())
N = len(S)
forw = S[:int((N-1)/2)]


back = S[int((N+3)/2)-1:]
print(forw, back)

if forw == forw[::-1] and back == back[::-1]:
    print("Yes")
else:
    print("No")
s=list(input())
n=len(s)
if s[::1] != s[::-1]:
    print('No')
else:
    if s[:((n-1)//2):1]!=s[:((n-1)//2):-1]:
        print('No')
    else:
        if s[((n+3)//2)-1:n:1] != s[((n+3)//2)-1:n:-1]:
            print('No')
        else:
            print('Yes')
S = input()
k1 = ''
k2 = ''
for i in range(0,(len(S) - 1) // 2):
  k1 += S[i]
for i in range(((len(S) + 3) // 2) - 1, len(S)):
  k2 += S[i]
print(k1)
print(k2)
if k1 == k1[::-1] and k2 == k2[::-1] and 3 <= len(S) <= 99:
  print('Yes')
else:
  print('No')
S = list(str(input()))
N = len(S)
if ((N-1)//2)%2:
  n = (N-1)//2
  e = (n-1)//2
  s = (n+3)//2-1
else:
  n = N//2
  e = n//2
  s = n//2
#print(S[:(N-1)//2] , S[(N+3)//2-1:] , S[:e], S[s:n])
if S[:(N-1)//2] == S[(N+3)//2-1:] and S[:(n-1)//2] == S[(n+3)//2-1:n]:
  print("Yes")
else:
  print("No")
def reverse(s):
    return s[::-1]


def isPalindrome(s):
    # Calling reverse function
    rev = reverse(s)

    # Checking if both string are equal or not
    if (s == rev):
        return True
    return False


S = input()
if isPalindrome(S):
    a = S[0: int((len(S) - 1) / 2)]
    b = S[int((len(S)+3)/2-1): len(S)]
    if isPalindrome(a) and isPalindrome(S):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
import sys
s =input()
n = len(s)
hn = int((n+1)/2)
qn = int((n+1)/4)
for i in range(qn):
  if s[i] == s[n-hn-i-1] and s[-i-1] == s[i+hn-n] and s[i] == s[-i-1]:
    pass
  else:
    print(i)
    print(s[-i])
    print(s[i-hn])
    print(s[i])
    print(s[n-hn-i-1])
    print("No")
    sys.exit()
print("Yes")
a=input()
a=list(a)
a1=[]
b1=[]
c1=[]
for i in range(len(a)-1,-1,-1):
    a1.append(a[i])
b=a[0:(len(a)-1)//2]
for i in range(len(b)-1,-1,-1):
    b1.append(a[i])
c=a[(len(a)+3)//2-1:len(a)]
for i in range(len(c)-1,-1,-1):
    c1.append(a[i])



if(a==a1):
    if(b==b1 and c==c1):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
str1 = input()
n = len(str1)
m = int((n-1)/2)
o = int((n+3)/2)
str2 = str1[:m]
str3 = str1[(o-1):n]
if str1 != str1[::-1]:
	print("No")
if str2 != str2[::-1]:
	print("No")
if str3 != str3[::-1]:
    print("No")
else:
    print("Yes")
S = input()
l = len(S)

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

def Kaibun(Str):
	return Str == Str[::-1]

if Kaibun(S) and Kaibun(S1) and Kaibun(S2):
	print("Yes")
else:
	print("No")
s = input()

def f(s):
    if s == s[::-1]:
        return True
    return False
n = len(s)
o = (n-1)//2
e = (n+3)//2 - 1
if f(s[:o]) and f(s[e:]):
    print("Yes")
else:
    print("No")
s = list(input())
t = s[::-1]
n = len(s)
if s != t:
  print ('No')
  exit()
if n == 3:
  print('Yes')
  exit()
d = s[:int((n-1)/2)+1]
e = d[::-1]
#print(d,e)
r = s[int((n+3)/2-1):]
q = r[::-1]
#print(r,q)
if d != e:
  print('No')
  exit()
if r != q:
  print ('No')
  exit()
S = input()
l = len(S)
fl = (l-1)//2
sl = (l+3)//2
f = S[:fl]
s = S[sl-1:]
if f == f[::-1] and s == s[::-1]:
    print('Yes')
else:
    print('No')
s = input()
ls = list(s)
print((len(ls)-1)/2 - 1)
ls1 = ls[:int((len(ls)-1)/2)]
ls2 = ls[int((len(ls)+3)/2) - 1:]
def kt(l):
    lr = list(reversed(l))
    if l == lr:
        return 1
    else:
        return 0
a = kt(ls)
b = kt(ls1)
c = kt(ls2)


d = a + b + c

if d >= 3:
    print('Yes')
else:
    print('No')
import math
s = input()
s1=s[::-1]
flag=0
if s==s1:
    s=s[0:math.ceil((len(s)-1)/2)]
    s1 = s[::-1]
    if s == s1:
        s = s[0:math.ceil((len(s)+3)/2)]
        s1 = s[::-1]
        if s == s1:
            flag=1
if flag==0:
    print('No')
else:
    print('Yes')
s=list(input())
N=len(s)
tmp=s[0:int((N-1)/2)+1]
tmp_rev=tmp[::-1]

tmp2=s[int((N+3)/2):N+1]
tmp2_rev=tmp2[::-1]

if tmp==tmp_rev and tmp2==tmp2_rev:
  print("Yes")
else:
  print("No")
S=input()
N=len(S)
T=S[:N//2]
U=S[N//2+1:]

flg=0

for i in range(int((N-1)/2)):
  if(S[i]!=S[-i-1]):
    print(S[i],S[-i])
    flg=1
    break
  
for j in range(len(T)//2):
  if(T[j]!=T[-j-1]):
    flg=1
    break
  
for k in range(len(U)//2):
  if(U[k]!=U[-k-1]):
    flg=1
    break

if(flg==0):
  print("Yes")
else:
  print("No")
def is_kaibun(string):
    offset = 0 if len(string) % 2 == 0 else 1

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


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