peterverebics/CodeNet_Python_118 huggingface dataset:
import math
def isPalindrome(string):
    # print("str: {}".format(string))
    flg = True
    rev = string[::-1]
    return (rev == string)

S = input()

res1 = isPalindrome(S)
a = math.floor((len(S)-1)/2)
res2 = isPalindrome(S[:a])
a = math.floor((len(S)+3)/2)
res3 = isPalindrome(S[a-1:])
if (res1 and res2 and res3):
    print("Yes")
else: print("No")
def palindrome(string):
    return 1 if string==string[::-1] else 0

s = input()
if(palindrome(s)):
    n = len(s)
    if(palindrome(''.join(list(s)[:((n-1)//2)]))):
        if(palindrome(''.join(list(s)[((n+3)//2)-1:n]))):
            print('Yes')
            exit()
print('No')
S = input()
N = (len(S) - 1) // 2
if S != S[::-1]:
    print("No")
elif S[:N] != S[:N][::-1]:
    print("No")
elif S[N + 1 :] != S[N + 1 :][::-1]:
    print("No")
else:
    print("Yes")
S=list(input())
SV=S[::-1]
N=len(S)

for i in range(N):
    F=1
    if S[i]!=SV[i]:
        F=0
        break

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

if F and FF:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)

check = True
for i in range(n//2):
    if s[i] != s[n - i - 1]:check = False
for i in range((n-1)//2):
    if s[i] != s[(n-1)//2 - i - 1]:check = False
for i in range((n-1)//2):
    if s[(n-1)//2 + i + 1] != s[n - i - 1]:check = False
if check:
    print("Yes")
else:
    print("No")
S=input()
N=len(S)
if S==S[::-1] and S[0:(N-1)//2]==S[0:(N-1)//2][::-1] and S[(N+3)//2-1:N]==S[(N+3)//2-1:N][::-1]:
  print("Yes")
else:
  print("No")
s=input()
def l(s):
    return s==s[::-1]
print("Yes")if l(s) and l(s[:(len(s)-1)//2]) and l(s[(len(s)+3)//2-1:]) else print("No")
s = input()
n = len(s)
flag = True
for i in range(n):
    if s[i] != s[n-i-1]:
        flag = False

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

n3 = (n + 3) // 2 - 1

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

if flag:
    print('Yes')
else:
    print('No')
s = input()
cen = -(-len(s)//2)-1
ans = 'Yes'
if s != s[::-1]:
    ans = 'No'
mae = s[:cen]
if mae != mae[::-1]:
    ans = 'No'

ato = s[cen+1:]
if ato != ato[::-1]:
    ans = 'No'
print(ans)
S = list(input())
N = len(S)
cnt = 0
for i in range(1,(N-1)//2 + 1):
    if S[i-1] != S[(N-1)//2 - i]:
        cnt += 1
for i in range((N+3)//2,N+1):
    if S[i-1] != S[(N-1)//2 - i -1 + (N+3)//2]:
        cnt += 1
if cnt == 0:
    print("Yes")
else:
    print("No")
def check_palindrome(target):
    reverse_t = target[::-1]
    if reverse_t == target:
        return True
    else:
        return False


s = input()
n = len(s)

if not check_palindrome(s):
    print('No')
    exit()

if not check_palindrome(s[:int((n-1)/2)]):
    print('No')
    exit()

if not check_palindrome(s[int((n+3)/2) - 1:]):
    print('No')
    exit()

print('Yes')
def isPalindrome(st):
    l = len(st)
    c = l//2
    if l%2 == 1:
        return st[:c] == st[c+1:][::-1]
    else:
        return st[:c] == st[c:][::-1]

S = input()
N = len(S)

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

L = len(S)
T = S[::L//2]
U = S[L//2+1:]

if S[::-1] == S and T[::-1] == T and U[::-1] == U:
    print("Yes")
else:
    print("No")
x = input()
N = len(x)
z = 'No'

x1 = x[:N//2]
x2 = x[N//2+1:]
if x == x[::-1]:
    if x1 == x1[::-1]:
        if x2 == x2[::-1]:
            z = 'Yes'
 
print(z)
# -*- coding: utf-8 -*-

s = list(input())
fl = True

sf = list(s)
sf.reverse()

if sf != s:
    fl = False
else:
    s1 = s[:len(s)//2]
    s1r = list(s1)
    s1r.reverse()
    if s1 != s1r:
        fl = False
    else:
        s2 = s[(len(s) + 3) // 2 - 1:]
        s2r = list(s2)
        s2r.reverse()
        if s2r != s2:
            fl = False

if fl:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
T = S[:(N-1)//2]
U = S[(N+1)//2:]
if S == S[::-1] and T == T[::-1] and U == U[::-1]:
    print ("Yes")
else:
    print ("No")
S = input()
N = len(S)
judge = True
for i in range(len(S)//2):
    if S[i] != S[len(S) - i - 1]:
        judge = False
        break


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

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

def reverse(s): 
    return s[::-1]

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

if isPalindrome(s):
    if n % 2 == 0:
        print("No")
    elif isPalindrome(s1) and isPalindrome(s2):
        print("Yes")
    else:
        print("No")
else:
    print("No")
s1 = input()
s1r = s1[::-1]
n1 = len(s1)
s2 = s1[:(n1-1)//2]
s2r = s2[::-1]
s3 = s1[-(n1-1)//2:]
s3r = s3[::-1]
if s1 == s1r and s2 == s2r and s3 == s3r:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)

flag = True
for i in range(len(S)//2):
    if S[i] != S[-i-1]:
        flag = False
        
left = S[0:(N-1)//2]
for i in range(len(left)//2):
    if left[i] != left[-i-1]:
        flag = False
        
right = S[(N+2)//2:N]
for i in range(len(left)//2):
    if right[i] != right[-i-1]:
        flag = False
        
if flag:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
if S == S[::-1]:
    tmp = S[:(N - 1) // 2]
    if tmp == tmp[::-1]:
        t = S[(N + 3) // 2 - 1:N]
        if t == t[::-1]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
s=input()
n=len(s)
m=(n-1)//2
j=(n+3)//2-1
t = s[:m]
u = s[j:]
if s == s[::-1] and t == t[::-1] and u == u[::-1]:
    print("Yes")
else:
    print("No")
s = input()
t = s[:(len(s) - 1) // 2]
reversed2 = lambda x: ''.join(reversed(x))
print('Yes' if (s == reversed2(s) and t == reversed2(t)) else 'No')
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))
S = input()
if S != S[::-1]:
    print("No")
    exit()

if S[:len(S)//2] != S[:len(S)//2][::-1]:
    print("No")
    exit()
print("Yes")
s = input()
sre = "".join(list(reversed(s)))
n = len(s)

s1 = s[0:int((n-1)/2)]
s1re = "".join(list(reversed(s1)))
s2 = s[int((n+3)/2)-1:]
s2re = "".join(list(reversed(s2)))
if s1 == s1re and s2 == s2re and s == sre:
    print("Yes")
else:
    print("No")
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)
n%2 == 1
ed=int((n-1)/2)
st=int((n+3)/2)

s2= s[0:ed]
s3= s[st:(-1)]


if is_kaibun(s) == False:
    print("No")
    exit()

elif is_kaibun(s)==True:
    if is_kaibun(s2)==True:
        if is_kaibun(s3)==True:
            print("Yes")
            exit()

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


def is_palindrome(s):
    return s == s[::-1]


N = len(S)

if not is_palindrome(S):
    print('No')
    exit()

if not is_palindrome(S[:(N - 1) // 2]):
    print('No')
    exit()

if not is_palindrome(S[(N + 3) // 2 - 1:]):
    print('No')
    exit()

print('Yes')
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")
s=input()
n=len(s)
jj=((n-1)//2)
t=s[0:jj]
kk=((n+3)//2)-1
tt=s[kk:n+1]
if(t==t[::-1] and tt==tt[::-1] and s==s[::-1]):
  print("Yes")
else:
  print("No")
S=input()
N=len(S)
for i in range(int(N/2)):
  if S[i]!=S[-(i+1)]:
    print("No")
    break
else:
  if S[0]==S[int(N/2)+1]:
    print("Yes")
  else:
    print("No")
s = input()
n = len(s)
A = s[0:(n-1)//2]
B = s[(n+1)//2:n]
if A == B and A == A[::-1] and B == B[::-1]:
    print("Yes")
else:
    print("No")
s = input()
num = len(s)
n1 = s[0:(num-1) // 2]
n2 = s[(len(s)+3) // 2-1:]

if s == s[::-1] and n1 == n1[::-1] and n2 == n2[::-1]:
  print("Yes")
else:
  print("No")
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")
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')
S = list(input())
N = len(S)
if S == S[::-1] and S[:(N - 1) // 2] == S[:(N - 1) // 2][::-1] and S[(N - 1) // 2 + 1:] == S[(N - 1) // 2 + 1:][::-1]:
    print("Yes")
else:
    print("No")
S=input()
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+3)//2-1:]
flag=0
if S==S[::-1]:
    flag+=1
if S1==S1[::-1]:
    flag+=1
if S2==S2[::-1]:
    flag+=1
if flag==3:
    print("Yes")
else:
    print("No")
s=list(input())
n=len(s)
a=all([p==q for p,q in zip(s,reversed(s))])
b=all([p==q for p,q in zip(s[:(n-1)//2],reversed(s[:(n-1)//2]))])
c=all([p==q for p,q in zip(s[(n+3)//2-1:],reversed(s[(n+3)//2-1:]))])

if a and b and c:
  print('Yes')
else:
  print('No')
#!/usr/bin/python
# -*- coding: utf-8 -*-

# 入力はstringで入る．
# intにしたければ int(input())
# floatで受け取ると 1.0 になる．

# 入力 : S
S = input()

N = len(S)

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

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

    if S[: num1] == S[num2 - 1 :]:
        print('{}'.format('Yes'))
    else:
        print('{}'.format('No'))

if __name__ == '__main__':
    main()
n = input()

x = len(n)

if n == n[::-1]:

    if n[:((x-1)//2)] == n[:((x-1)//2)][::-1]:

        if n[((x+3)//2)-1:] == n[((x+3)//2)-1:][::-1]:

            print('Yes')

        else:

            print('No')

    else:

        print('No')

else:

    print('No')
def is_kaibun(str):
    for i in range(len(str) // 2):
        if str[i] != str[~i]:
            return False
    return True


s = input()
n = len(s)
if is_kaibun(s) and is_kaibun(s[:n // 2]):
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
a = S[0:N//2]
b = S[N//2+1:N]
if S == S[::-1] and a == a[::-1] and b == b[::-1]:
    ans = "Yes"
else:
    ans = "No"
print(ans)
s = input()
def kaibunn(a):
  for i in range(len(a)//2):
    if not a[i] == a[-1-i]:
      return 0
  return 1
n =len(s) 
if kaibunn(s) == 1 and kaibunn(s[:(n-1)//2]) == 1 and kaibunn(s[(n+3)//2-1:])==1:
  print('Yes')
else:
  print('No')
S = input()
N=len(S)
S1 = S[0:int((N-1)/2)]
S2 = S[int((N+3)/2)-1:N]
S_r = ''.join(list(reversed(S)))
S1_r = ''.join(list(reversed(S1)))
S2_r = ''.join(list(reversed(S2)))
if S==S_r and S1==S1_r and S2==S2_r:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
a = S[0:(N-1)//2]
b = S[(N+3)//2-1:]


def k(a):
    for i in range(len(a)):
        if a[i] != a[len(a)-1-i]:
            return False
    else:
        return True

if k(S) & k(a) & k(b):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)

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

ans = 'No'

if check(S):
    if check(S[0:(N-1)//2]):
        if check(S[(N+3)//2-1:N]):
            ans = 'Yes'

print(ans)
S = input()
N = len(S)
i = int((N - 1) / 2)
j = int((N + 3) / 2)
T = S[0:i]
U = S[j-1:N]

if S == S[::-1]  and T == T[::-1] and U == U[::-1]:
    print('Yes')
else:
    print('No')
S=input()
N=len(S)

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

for i in range(len(S)):
	if S[i]!=S[-(i+1)]:
		print("No")
		exit()
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")
s = input()

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

flag = True

if s != s[::-1]:
    flag = False
if s1 != s1[::-1]:
    flag = False

print("Yes" if flag else "No")
S = input()
N = len(S)

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

if is_kaibun(S) and is_kaibun(S[:int((N - 1) / 2)]) and is_kaibun(S[int((N + 3) / 2 - 1):]):
    print('Yes')
else:
    print('No')
import sys

S = input()
S1 = ''
S2 = ''
if S == S[::-1]:
    S1 = S[0:(len(S) - 1) // 2]
    if S1 == S1[::-1]:
        S2 = S[(len(S) + 3) // 2 - 1:]
        if S2 == S2[::-1]:
            print('Yes')
            sys.exit()
print('No')
s = input()
n = len(s)
r = (n-1)//2
l = (n+3)//2
for i in range(r):
  if (s[i] != s[r-i-1] or s[l-1+i] != s[n-1-i]):
    print("No")
    exit()
  elif s[i] != s[n-1-i]:
    print("No")
    exit()
print("Yes")
S = input()

N = len(S)

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

if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:
    print('Yes')
else:
    print('No')
s=input()
lst=[]
for i in s:
    lst.append(i)
def check(ls):
    ls_=list(reversed(ls))
    if not ls==ls_:
        print('No')
        exit()
check(lst)
n=len(lst)
check(lst[:(n-1)//2])
check(lst[(n+3)//2-1:])
print('Yes')
s = input()
flag = 0
for i in range(len(s)//2):
    if s[i] != s[len(s)-1-i]:
        flag = 1
for i in range((len(s)-1)//2//2):
     if s[i] != s[(len(s)-1)//2-1-i]:
        flag = 1
j = 0
for i in range((len(s)+3)//2-1,len(s)):
    if s[i] != s[len(s)-1-j]:
        flag = 1
    j += 1
if flag == 1:
    print('No')
else:
    print('Yes')
S = input()
N = len(S)
flag = 0

be = int((N-1)/2)
af = int((N+3)/2-1)

for i in range(be):
  if S[i] != S[be-1-i]:
    flag = 1
    break
  
for i in range(af, N):
  if S[i] != S[N-1-i]:
    flag = 1
    break

if flag:
  print('No')
else:
  print('Yes')
# -*- coding: utf-8 -*-
# 入力
s = input()

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

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)
S = list(input())

N = len(S)
M = N // 2
A = S[:M]
B = S[M + 1:]

flag = True
for i in range(M):
  if A[i] != B[-1 - i]:
    flag = False
  if A[i] != A[-1 - i]:
    flag = False

if flag:
  print("Yes")
else:
  print("No")
# n = int(input())
s = input()
# a, b = map(int, input().split())
# l = list(map(int, input().split()))

a = (len(s) - 1) // 2
b = (len(s) + 3) // 2 - 1
aa = s[0: a]
bb = s[b:]

if aa == bb:
    print("Yes")
else:
    print("No")
def isp(s):
    return s==s[::-1]

s=input()
n=len(s)//2
if(isp(s) and isp(s[:n])):
    print("Yes")
else:
    print("No")
S = input()
N = int((len(S)-1)/2)
flag = 0
for i in range(N):
    if S[i] != S[len(S)-1-i]:
        flag = 1

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

def kai(s):
  n = len(s)
  if n % 2 != 0:
    if s[:int((n-1)/2)] == s[int((n+1)/2):][::-1]:
      return True
    else:
      return False
  else:
    if s[:int(n/2)] == s[int(n/2):][::-1]:
      return True
    else:
      return False

s1 = s[:int((n-1)/2)]
s2 = s[int((n+1)/2):]
#print(s, s1, s2)
#print([kai(s),kai(s1),kai(s2)])
if sum([kai(s),kai(s1),kai(s2)]*1) == 3:
  print('Yes')
else:
  print('No')
def kaibun(s):
    return s==s[::-1]

s=input()
N=len(s)
if kaibun(s) and kaibun(s[:(N-1)//2]) and kaibun(s[-1+(N+3)//2:]):
    print("Yes")
else:
    print("No")
def kaibun(s):
    n = len(s)
    if s[:int(n/ 2)] == s[:-int(n / 2) - 1:-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')
def palindrome(word):
  if len(word) <= 1:
    return True
  if word[0] != word[-1]:
    return False
  return palindrome(word[1:-1])
 
word = input()
n = len(word) // 2
issuper = palindrome(word[:n]) and palindrome(word[n+1:]) and palindrome(word)
print("Yes" if issuper else "No")
S = input()

ans = "No"
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]:
            ans = "Yes"
print(ans)
S=input()

SS=S[::-1]

#print(SS)

if(S!=SS):
    print("No")
    exit()

Slen=int((len(S)-1)/2)
S1=S[:Slen]
SS1=S1[::-1]

if(S1!=SS1):
    print("No")
    exit()
    
Slen=int((len(S)+3)/2)
S1=S[Slen-1:]
SS1=S1[::-1]
#print(S1)
if(S1!=SS1):
    print("No")
    exit()
print("Yes")
S = input()
N = len(S)
S_inv = S[::-1]

if S == S_inv and S[:int((N-1)/2)] == S_inv[int((N+1)/2):] and S[int((N+1)/2):] == S_inv[:int((N-1)/2)]:
    print('Yes')
else:
    print('No')
def valid():
    S = input()
    N = len(S)
    if S != S[::-1]:
        return False

    sub = S[0:(N-1) // 2] 
    if sub != sub[::-1]:
        return False

    sub = S[(N+3)//2-1:]
    if sub != sub[::-1]:
        return False

    return True

if valid():
    print('Yes')
else:
    print('No')
def CheckPalindrome(S, L):
    result = True
    for i in range((L+1)//2):
        if S[i] != S[-i-1]:
            result = False
            break
    return result

result = True
S = input()
L = len(S)

result = CheckPalindrome(S, L)

if result:
    S2 = S[:(len(S)-1) // 2]
    L2 = len(S2)
    result = CheckPalindrome(S2, L2)

if result:
    S3 = S[(L+3)//2-1:]
    L3 = len(S3)
    result = CheckPalindrome(S3, L3)

if result:
    print('Yes')
else:
    print('No')
S = input()
sb = S[:(len(S) - 1) // 2]
sc = S[(len(S) + 3) //2 -1:]
a = S == "".join(reversed(S))
b = sb == "".join(reversed(sb))
c = sc == "".join(reversed(sc))
print("Yes" if a and b and c == True else "No")
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')
s=str(input())
n = len(s)
dev1 = s[0:(n-1)//2]
dev2 = s[(n+3)//2 - 1:n]
if dev1 == dev1[::-1] and dev2 == dev2[::-1] and s == s[::-1]:
    print("Yes")
else:
    print("No")
#-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")
import sys
input = sys.stdin.readline

s = input()[:-1]; n = len(s)
print('Yes' if s == s[::-1] and s[:(n-1)//2] == s[:(n-1)//2][::-1] and s[(n+1)//2:] == s[(n+1)//2:][::-1] else 'No')
S = list(str(input()))
inv = list(reversed(S))
n = len(S)
d = int((n-1)/2)
q = int((n+1)/2)
if S != inv:
    print('No')
else:
    if S[:d] == S[q:]:
        print('Yes')
    else:
        print('No')
def read():
    S = input()
    return S,

def is_palindrome(x):
    n = len(x)
    for i in range(n):
        if x[i] != x[n-1-i]:
            return False
    return True

def solve(S):
    N = len(S)
    a = S[:N//2]
    b = S[N//2+1:]
    if is_palindrome(S) & is_palindrome(a) & is_palindrome(b):
        return 'Yes'
    else:
        return 'No'

if __name__ == '__main__':
    inputs = read()
    print("{}".format(solve(*inputs)))
s=input()
n=len(s)
for i in range(n):
    if not s[i]==s[n-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[i]==s[(n-1)//2-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[(n+3)//2-1+i]==s[n-1-i]:
        print('No')
        quit()
print('Yes')
s = input()
o = "No"
if s == s[::-1]:
  o = "Yes"
n = len(s)
if s[:int((n-1)/2)] != str(s[:int((n-1)/2)])[::-1]:
  o = "No"
if s[int((n+3)/2)-1:] != (s[int((n+3)/2)-1:])[::-1]:
  o = "No"
print(o)
def isPalindrome(sentence):
    for i in range((len(sentence))//2):
        if sentence[i] != sentence[-i-1]:
            return False
    return True


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


def isP(s):
    l, r = 0, len(s)-1
    while l < r:
        if s[l] != s[r]:
            return False
        l += 1
        r -= 1
    return True


if isP(S) and isP(S[:(N-1)//2]) and isP(S[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return False
    return True

S = input()
N = len(S)

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

def checkPalindrome(string):
    l = len(string)
    string2 = string[::-1]
    if string[:l//2] == string2[:l//2]:
        return True
    else:
        return False

if checkPalindrome(S):
    if checkPalindrome(S[:(lenS-1)//2]):
        if checkPalindrome(S[(lenS+3)//2-1:]):
            ans = "Yes"

print(ans)
s = input()
n = int(len(s))
list = list(s)
lists = list[::-1]
list2 = list[0:(int((n-1)/2))]
list2s = list2[::-1]
list3 = list[int((n + 3)/2)-1:n+1]
list3s = list3[::-1]
count = 0

if list == lists:
    count = count + 1
if list2 == list2s:
    count = count + 1
if list3 == list3s:
    count = count + 1
if count == 3:
    print("Yes")
else:
    print("No")
def palin(x):
    #print(x)
    if x == x[::-1]: return True
    return False

a = input()
n = len(a)
if palin(a) and palin(a[:int((n-1)/2)]) and palin(a[int((n+3)/2)-1:]):
    print("Yes")
else: print("No")
def is_palindrome(s):
    # print(s)
    for i in range(len(s) // 2 + 1):
        if s[i] != s[-(i+1)] and '.' not in [s[i], s[-(i+1)]]:
            return False
    return True

s = input()

a = is_palindrome(s)
b = is_palindrome( s[:(len(s)-1)//2])
c = is_palindrome(s[(len(s)+3)//2-1:])

if a and b and c:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)

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

if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
  print("Yes")
else:
  print("No")
def judge(s):
    inv_str = s[::-1]
    # print(inv_str)
    if(s == inv_str):
        return 0
    else:
        return 1

x = str(input())
len = len(x)
x1 = x[:int((len-1)/2)]
x2 = x[int((len+3)/2-1):]

if(judge(x1)==0 and judge(x2)==0 and judge(x)==0):
    print("Yes")
else:
    print("No")
S = input()
def kaibun(st):
    stre = st[::-1]
    if st == stre:
        return 1
    else:
        return 0

if kaibun(S[0:(len(S)-1) // 2]) and kaibun(S) and kaibun(S[(len(S)+3) // 2-1:len(S)]):
    print("Yes")
else:
    print("No")
#!/usr/bin/env python3
def ispalindrome(str): return 1 if str == str[::-1] else 0
S = input()
N = len(S)
S_2 = S[0:(N-1)//2]
S_3 = S[(N+3)//2-1:]
jdg = 0

jdg += ispalindrome(S)
jdg += ispalindrome(S_2)
jdg += ispalindrome(S_3)

if jdg == 3:
    print("Yes")
else:
    print("No")
s = input()
n = len(s)
s1, s2 = s[:(n-1)//2], s[(n+3)//2-1:]
if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-

def kaibun(s):
    n = len(s)
    flag = True
    for i in range(n // 2):
        if s[i] == s[n-i-1]:
            continue
        else:
            flag = False
            break
    return flag


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


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


s_pali = is_palinedrome(s)
sub_pali_left = is_palinedrome(s[:len(s)//2])
sub_pali_right = is_palinedrome(s[len(s)//2+1:])

if s_pali and sub_pali_left and sub_pali_right:
    print('Yes')
else:
    print('No')