peterverebics/CodeNet_Python_118 huggingface dataset:
str = input()
f = ((len(str)-1)//2)
s = ((len(str)+3)//2)
rf=str[:f]
fr=rf[::-1]
sf=str[s-1:]
fs=sf[::-1]
if str[::-1] == str and str[:f]  == fr and str[s-1: ] == fs:
    print('Yes')
else:
    print('No')
S = input()

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

N = len(S)
is_kaibun(S)
is_kaibun(S[:(N-1)//2])
is_kaibun(S[(N+3)//2-1:])
print('Yes')
S=input()
N=len(S)
def is_kaibun(a,b):#ind a~b
    for i in range(a,b+1):
        if i>=b-i:
            break
        if S[i]!=S[b-i]:
            return False
    return True
if is_kaibun(0,(N-3)//2) and is_kaibun((N+1)//2,N-1) and is_kaibun(0,N-1):
    print("Yes")
else:
    print("No")
s=input()
n=len(s)
x=(n-1)//2
i=0
while i<x:
  if s[i]!=s[n-1-i] or s[i]!=s[x-1-i]:
    print('No')
    break 
  i=i+1
else:
  print('Yes')
S = input()

N = len(S)

ans = True
for i in range(N//2):
    ans = ans and S[i]==S[N-1-i]

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

for i in range(N2//2):
    ans = ans and S1[i] == S1[N2-1-i]
    ans = ans and S2[i] == S2[N2-1-i]

if ans:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
A = S[:int((N-1)/2)]
B = S[int((N+3)/2)-1:]
out = 0

for i in range(N):
    if S[i]!=S[N-i-1]:
        out = 1
for i in range(len(A)):
    if A[i]!=A[len(A)-i-1]:
        out = 1
for i in range(len(B)):
    if B[i]!=B[len(B)-i-1]:
        out = 1

if out==0:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 19 20:52:57 2020

@author: over-
"""

S=input()
N=len(S)

ans="Yes"

for i in range(int((N-1)/2)):
    if S[i]!=S[N-i-1]: ans="No"

for i in range(int((N-1)/2/2)):  
    if S[i]!=S[int((N-1)/2)-i-1]: ans="No"

for i in range(int(N-(N+3)/2)):
    #print(S[int((N+3)/2)+i],S[N-i-1])
    if S[int((N+3)/2)+i-1]!=S[N-i-1]: ans="No" 

print(ans)
S = input()

N = len(S)

def func(S,ans,N):
    for i in range(N):
        if S[i] != S[N - i-1]:
            ans ='No'
    return (ans)

ans = func(S, 'Yes',(len(S)-1//2))
S1 = S[(N+3)//2-1:N]
ans = func(S1, ans,len(S1))

print(ans)
S = input()
N = len(S)

S_1 = S[0:int((N-1)/2)]
S_2 = S[int((N+3)/2-1):N+1]

print('Yes' if S[::-1] == S and S_1[::-1] == S_1 and S_2[::-1] == S_2 else 'No')
S = input()

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

if a == b and a == a[::-1]:
    print('Yes')
else:
    print('No')
S = list(input())
k = (len(S) -1) // 2 
T = S[0:k]
#print(T[::-1])
print("Yes" if S == S[::-1] and T == T[::-1] else "No")
s = input()
ss = s[:len(s) // 2]

ans = "Yes"
if s != s[::-1] or ss != ss[::-1]: ans = "No"

print(ans)
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))

s = list(input())
n = len(s)

if s != list(reversed(s)):
    print("No")
    exit()

tmp = s[0:int(((n-1)/2))]
#print(tmp)
if tmp != list(reversed(tmp)):
    print("No")
    exit()


tmp = s[int(((n+3)/2))-1:]
#print(tmp)
if tmp != list(reversed(tmp)):
    print("No")
    exit()

print("Yes")
S = list(input())
N = len(S)
S_mae = S[:int((N-1)/2)]
S_usi = S[int((N+1)/2):]

if S_mae == S_mae[::-1] and S_usi == S_usi[::-1] and S == S[::-1]:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
res = False
P = []
L = []
K = []
for s in range(N):
    P.append(S[s])
L = P[:(N-1)//2]
K = P[(N+3)//2-1:N]
if L == K:
    res = True
if res:
    print('Yes')
else:
    print('No')
s=raw_input()
flag=0
s1=s[::-1]
# print s1
if s1!=s:
  print "No"
  exit(0)
s1=s[0:(len(s)-1)/2]
s2=s1[::-1]
# print s1
if s1!=s2:
  print "No"
  exit(0)

print "Yes"
import sys
L=list(input())
N=len(L)
R=N//2
for i in range(R):
  if L[i]!=L[N-1-i]:
    print("No")
    sys.exit()
  elif L[i]!=L[R-1-i]:
    print("No")
    sys.exit()
print("Yes")
s=input()
def kaibun(aa) :
  for i in range(len(aa)):
    if aa[i]!=aa[-i-1] :
      return False
    
  return True


b=int((len(s)-1)/2)
c=int((len(s)+3)/2)
mae=s[:b]
ato=s[c-1:]
if kaibun(s) and kaibun(mae) and kaibun(ato) :
  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:]

if s == s[::-1] and s_1 == s_1[::-1] and s_2 == s_2[::-1]:
    print('Yes')
else:
    print('No')
S = input()

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

if (S == s and a == c):
    if(b == d):
        print('Yes')
    else:
        print('No')
else:
    print('No')
s=list(map(str, input()))
s_=s.copy()
s.reverse()
a=s_[:int((len(s_)-1)/2)]
a_=a.copy()
a.reverse()
b=s_[int((len(s_)+3)/2)-1:]
b_=b.copy()
b.reverse()
if s_==s and a_==a and b_==b:
    print('Yes')
else:
    print('No')
s=input()
def judge(s):
    for i in range(len(s)):
        if s[i]!=s[-1-i]:
            return False
    return True

if judge(s) and judge(s[:(len(s)-1)//2]) and judge(s[(len(s)+3)//2-1:]):
    print("Yes")
else:
    print("No")
s = input()
n = len(s)
sa = s[:(n-1)//2]
sb = s[(n+3)//2-1:n]
if s == s[::-1] and sa == sa[::-1] and sb == sb[::-1]:
    print("Yes")
else:
    print("No")
S = input()
a = (len(S) - 1) // 2
b = (len(S) + 3) // 2 - 1
if S == S[::-1] and S[:a] == S[:a][::-1] and S[b:] == S[b:][::-1]:
    print("Yes")
else:
    print("No")
def isPalindrome(st): 
    for i in range(0, int(len(st)/2)):  
        if st[i] != st[len(st)-i-1]: 
            return False
    return True
st = input()
if isPalindrome(st):
	n1 = int((len(st) - 1)/2)
	n2 = int((len(st) + 3)/2) - 1
	if isPalindrome(st[0:n1]):
		if isPalindrome(st[n2:]):
			print("Yes")
		else:
			print("No")
	else:
		print("No")
else:
	print("No")
S = input()
N = len(S)
def f(s):
    n = len(s)
    for i in range((n-1)//2+1):
        if s[i] != s[n-i-1]:
            return False
    return True

if f(S) and f(S[:(N-1)//2]):
    print("Yes")
else:
    print("No")
import sys
s = input()
for i in range(len(s)//2):
    if s[i] != s[len(s) - i - 1]:
        print("No")
        sys.exit(0)
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")
def isstrong(s):
    n = len(s)
    if s != s[::-1]: return False
    s1 = s[0:(n - 1)//2]
    s2 = s[(n + 1) // 2:]
    #print(s1)
    #print(s2)
    if s1 != s1[::-1]: return False
    if s2 != s2[::-1]: return False
    return True

s = input()
if isstrong(s):
    print('Yes')
else:
    print('No')
s = input()
l = len(s)
#print(s[:(l-1)//2])
#print(s[(l+3)//2-1:])
def pal(t):
    c = 1
    for i in range((len(t)-1)//2):
        if t[i] != t[-i-1]:
            c = 0
    return c
"""
if pal(s) and pal(s[:(l-1)//2]) and pal(s[(l+3)//2-1:]):
    print("Yes")
else:
    print("No")

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

ss =s[::-1]

sss =s[1:((n-1)//2)-1]
mmm = sss[::-1]

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


if s == ss and sss == mmm and ssss == mmmm:
    print('Yes')
else:
    print('No')
s = input()

n = len(s)

ans = 0

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

s5 = s[::-1]

s3 = s1[::-1]
s4 = s2[::-1]

#print(s5, s3, s4)
if s1 == s3:
    ans += 1

if s2 == s4:
    ans += 1

if s == s5:
    ans += 1

if ans == 3:
    print('Yes')
else:
    print('No')
S=str(input())
def is_kaibun(kaibun):
    for i in range(len(kaibun)//2):
        if kaibun[i] != kaibun[-i-1]:
            return print('No')
    for j in range(len(kaibun)//4):
        if kaibun[j] != kaibun[-(j+len(kaibun)//2)-2]:
            return print('No')
        if kaibun[j+len(kaibun)//2+1] != kaibun[-(j+len(kaibun)//2)-2]:
            return print('No2')
    return print('Yes')

is_kaibun(S)
def f(s):
  m = len(s)//2
  flag = True
  for i in range(m):
    flag = flag and s[i]==s[-i-1]
  return flag

s = input()
n = (len(s)-1)//2

s1 = s[:n]
s2 = s[n+1:]

if s1==s2 and f(s1):
  print('Yes')
else:
  print('No')
s = input()
t = s[::-1]
n = len(s) // 2
ans = False
if s[0:n] == t[0:n]:
	if s[0:n] == s[n+1:n*2+2]:
		ans = True

if ans:
	print('Yes')
else:
	print('No')
# B - String Palindrome
def main():
    S = input().rstrip()
    N = len(S)
    left, right = S[: (N - 1) // 2], S[(N + 3) // 2 - 1:]
    is_palindrome = S == S[::-1]
    check_left = left == left[::-1]
    check_right = right == right[::-1]
    print("Yes" if is_palindrome and check_left and check_right else "No")


if __name__ == "__main__":
    main()
a = input()
if len(a) % 2 == 0:
    print('No')
else:
    N = int((len(a) - 1) / 2)
    if a[:N] == a[-N:] == a[:N:-1]:
        print('Yes')
    else:
        print('No')
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")
#!/user/bin/env python3
# -*- conding: utf-8 -*-

def main():
    S = input()
    N = len(S)
    flag = 'No'

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

    if S == S[::-1]:
        if s1 == s1[::-1]:
            if s2 == s2[::-1]:
                flag = 'Yes'
    
    print(flag)


if __name__ == '__main__':
    main()
s = input()
n = len(list(s))
p = s[:(n-1)//2]
t = s[(n+1)//2:]
p1 = ""
t1 = ""
for i in reversed(range((n-1)//2)):
    p1 += p[i]
    t1 += t[i]
if t1 == t and p1 == p and s == t1 + s[(n-1)//2]+p1:
    print("Yes")
else:
    print("No")
s = input()
n = len(s)
sl = s[:n//2]
sr = s[n//2+1:]
if sl == sr and sr ==  sr[::-1]:
    print('Yes')
else:
    print('No')
S = input()
S1 = S[0:(len(S)-1)//2]
S2 = S[(len(S)-1)//2+1:len(S)]

def discrimination(S):
    N = len(S)
    if N%2==0:
        return all(S[i]==S[N-1-i] for i in range(N//2))
    else:
        return all(S[i]==S[N-1-i] for i in range((N-1)//2))

if discrimination(S) and discrimination(S1) and discrimination(S2):
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-

def check_palindrome(S):
    for i in range(int(len(S) / 2)):
        if S[i] != S[-1 * (i + 1)]:
            return False
    return True

S = input()

if not check_palindrome(S):
    print('No')
else:
    if not check_palindrome(S[:int(len(S) / 2)]):
        print('No')
    else:
        if not check_palindrome(S[int(len(S) / 1) + 2:]):
            print('No')
        else:
            print('Yes')
import copy
S = list(input())
N = len(S)
ReS = copy.copy(S)
o = 1
for i in S:
    ReS[N-o] = i
    o += 1
if S == reversed(S):
    print("Yes")
if S == ReS:
    if S[0:int((N-1)/2)] == ReS[int((N+1)/2): N]:
        if S[int((N+1)/2): N] == ReS[0:int((N-1)/2)]:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
        print("No")
s = str(input())
for i in range(len(s)//2):
    if s[i] != s[-(i+1)]:
        print("No")
        exit()
for i in range(len(s)//4):
    if s[i] != s[(len(s)//2-i-1)]:
        print("No")
        exit()
for i in range(len(s) - (len(s)+3)//2):
    if s[(len(s)+3)//2+i-1] != s[-(i+1)]:
        print("No")
        exit()
print("Yes")
s = str(input())

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

n = len(s)
sub1 = s[0:(n - 1)//2]
sub2 = s[(n + 3)//2 - 1:n + 1]

if is_kaibun(s) and is_kaibun(sub1) and is_kaibun(sub2):
    print('Yes')
else:
    print('No')
a = input()

N = len(a)
t = int((N-1)/2) #真ん中まで
hantei = True

for i in range(t):
  if a[i] == a[t-1-i]:
    hantei = True
  else:
    hantei = False

if hantei == False:
  print("No")
else:
  b = a[:t+1] + a[:t]
  if a == b:
    print("Yes")
  else:
    print("No")
s=str(input())
n=len(s)
x=s[:(n-1)//2]
y=s[(n+3)//2-1:]
ans=0

for i in range(3):
    if s==s[::-1]:
        ans +=1

    if i==0:
        s=x
    elif i==1:
        s=y

print("Yes" if ans==3 else "No")
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
n = len(s)
ans = 'Yes'
if s != s[::-1]:
    ans = 'No'
x = math.floor(n/2)
y = math.ceil(n/2)
a = s[0:x]
b = s[y:]
if a != a[::-1] or b != b[::-1]:
    ans = 'No'
print(ans)
s = input()

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

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

if check(s) and check(s1) and check(s2):
    print("Yes")
else:
    print("No")
s = input()

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

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

if flag:
    print("No")
else:
    print("Yes")
s = input() #sys.stdin.readlineは最後が改行

n = len(s)
hn = (n-1)//2
hs = s[:hn]

for i in range(hn):
    if s[i] != s[-1-i]:
        print('No')
        exit()
    if hs[i] != hs[-1-i]:
        print('No')
        exit()

print('Yes')
import sys
input=sys.stdin.readline
S = input()[:-1]
n = len(S)
def kaibun(S):
    if S == S[::-1]:
        return 1
    else:
        return 0
if kaibun(S) == 0:
    print("No")
else:
    s1 = S[0:n // 2]
    if kaibun(s1) == 1:
        print("Yes")
    else:
        print("No")
s = list(input())
n = len(s)

ans = 'Yes'
for i in range((n-1)//2):
    if s[i] != s[n-i-1]:
        ans = 'No'
for i in range((n-1)//2):
    if s[i] != s[(n-1)//2-i-1]:
        ans = 'No'
s_inv = s[::-1]
for i in range((n-1)//2):
    if s_inv[i] != s_inv[(n-1)//2-i-1]:
        ans = 'No'
print(ans)
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")
S = input()
N = len(S)
if S[:] == S[N-1::-1] and S[0:N//2] == S[N//2-1::-1] and S[(N+3)//2-1:] == S[N-1:(N+3)//2-2:-1]:
    print("Yes")
else:
    print("No")
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    S = input()

    flag = 0
    n = len(S)
    if S == S[::-1]:
        flag += 1
    s = S[:n//2]
    if s == s[::-1]:
        flag += 1
    s = S[(n+3)//2-1:]
    if s == s[::-1]:
        flag += 1
    if flag == 3:
        print('Yes')
    else:
        print('No')


main()
S = input()

index1 = (len(S)-1)//2
index2 = (len(S)+3)//2
S_sub1 = S[:index1]
S_sub2 = S[index2-1:]

if S == S[::-1] and S_sub1 == S_sub1[::-1] and S_sub2 == S_sub2[::-1]:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
S1 = S[:N//2]
S2 = S[N//2 + 1:]
N1 = len(S1)
if S1 != S2:
    print('No')
    exit()

for i in range(N//4):
    if S1[i] != S1[-i - 1]:
        print('No')
        exit()
print('Yes')
S = input()
N = len(S)

tmp1, tmp2 = [], []
flag = 0
for i in range(int((N-1)/2)):
  tmp1.append(S[i])
for i in range(int((N+3)/2)-1,N):
  tmp2.append(S[i])
#print(tmp1, tmp2)
if tmp1 == tmp2:
  flag = 1
  
if flag == 1:
  print('Yes')
else:
  print('No')
frag=0
a = list(input())
N=len(a)-1
for i in range(int(N/2)):
    if a[i]!=a[N-i]:
        frag=1
        break
if frag==0:
    for i in range(int(N/4)):
        if a[i]!=a[int(N/2-i-1)] or a[N-i]!=a[int(N/2+i+1)]:
            frag=1
            break
if frag==0:
    print('Yes')
else:
    print('No')
s = input()

n = len(s)
ans = "Yes"

if s != s[::-1]:
    ans = "No"
elif s[:(n-1)//2] != s[:(n-1)//2][::-1]:
    ans = "No"
elif s[(n+2)//2:] != s[(n+2)//2:][::-1]:
    ans = "No"
    
print(ans)
s = input()
s1 = s[:len(s)//2]
s2 = s[len(s)//2+1:]
print("Yes" if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1] else "No")
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")
S = input()
N = len(S)
if S == S[::-1] and S[:int((N-1)/2)] == S[:int((N-1)/2)][::-1]:
    print('Yes')
else:
    print('No')
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')
s = input()
ans = True
for i in range(len(s) // 2):
    if s[len(s) - 1 - i] != s[i]:
        ans = False
if ans:
    for i in range(len(s) // 4):
        if s[(len(s) - 1) // 2 - i - 1] != s[i]:
            ans = False

    for i in range(len(s) // 2 + 1, len(s) // 4 + len(s) // 2 + 1):
        if s[i] != s[len(s) - 1 - i]:
            ans = False

print('Yes' if ans else 'No')
s = input()

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

flag = True

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

for a in range(len(s_1)//2):
    if s_1[a] != s_1[-(a+1)]:
        flag =False

for a in range(len(s_2)//2):
    if s_2[a] != s_2[-(a+1)]:
        flag =False

if flag:
    print("Yes")
else:
    print("No")
s=input()
n=len(s)
def han(s):
    return s==s[::-1]
if han(s):
    if han(s[:(n-1)//2]):
        if han(s[(n+1)//2:]):
            print('Yes')
            exit()
print('No')
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")
S = input()
N = len(S)

def isPalindrome(S, i, j):
    i = int(i)
    j = int(j)
    while S[i] == S[j]:
        i+=1
        j-=1
        if i >= j:
            return True
    return False

if isPalindrome(S, 0, N-1) and isPalindrome(S, 0, (N-1)/2-1) and isPalindrome(S, (N+3)/2-1, N-1):
    print('Yes')
else:
    print('No')
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")
s = input()

flag = 0
slen = len(s)

if s == s[::-1]:
  flag += 1
  
s1 = s[::(slen-1)//2]
if s1 == s1[::-1]:
  flag += 1
  
s2 = s[(slen+3)//2-1:]
if s2 == s2[::-1]:
  flag += 1

if flag > 2:
  print('Yes')
else:
  print('No')
S = input()
N = len(S)

Srev = "".join(list(reversed(S)))

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

S1 = S[:(N-1)//2]
S1rev = "".join(list(reversed(S1)))
if S1 != S1rev:
  print('No')
  exit()

S2 = S[(N+3)//2 - 1:N]
S2rev = "".join(list(reversed(S2)))

if S2 != S2rev:
  print('No')
  exit()

print('Yes')
s = input()
rs = s[::-1]
if s != rs:
  print("No")
  exit()
n = len(s)
m = int((n-1)/2)
l = int((n+1)/2)
if s[:m] != rs[l:]:
  print("No")
  exit()
if s[l:] != rs[:m]:
  print("No")
  exit()
print("Yes")
# ABC 159 B
s = input()
n = len(s)
l = s[:((n-1)//2)]
r = s[((n+3)//2) -1:]
if s == s[::-1] and l == l[::-1] and r == r[::-1]:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)
s1 = s[:n//2] 
s2 = s[n//2 + 1:]

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

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

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

S = input()

m = len(S) >> 1
L, R = [""] * (m), [""] * (m)
for i in range(m):
	L[i] = S[i]
	R[i] = S[i + m + 1]

if not (IsPalindrome(L) and IsPalindrome(S) and IsPalindrome(R)):
	print("No")
else:
	print("Yes")
S = input()
answer = 'Yes'
if S != S[::-1]:
    answer = 'No'
first = S[:len(S) // 2]
last = S[len(S) // 2 + 1:]
if first != first[::-1]:
    answer = 'No'
if last != last[::-1]:
    answer = 'No'
print(answer)
s = input()

n = int(len(s))

n1 = int ( (n - 1 ) / 2 )
n2 = int ( (n + 1 ) / 2 )

s1 = s[0:n1]
s2 = s[n2:n]

def if_kai( st ):
  ret = True
  nn = len(st)
  nn1 = int ( (nn - 1 ) / 2 )
  for i in range(nn1+1):
    if st[i] != st[nn-i-1] :
       ret = False
       break
  return ret      

if if_kai( s ) and if_kai( s1 ) and if_kai( s2 ) :
  print('Yes')
else:
  print('No')
s = input()
n = len(s)
a = s[:(n-1)//2]
b = s[(n+3)//2-1:n]
if s == s[::-1] and a == a[::-1] and b == b[::-1]:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)
A = []
for s in range(N):
    A.append(S[s])
B = []
C = []
B = A[:(N-1)//2]
C = A[(N+3)//2-1:N]
if B == C:
    print('Yes')
else:
    print('No')
s = input()
for i in range(len(s)//4+1):
    if not s[i] == s[len(s)//2-1-i] == s[len(s)//2+1+i] == s[-1-i]:
        print('No')
        break
else:
    print('Yes')
S = input()
n = len(S)
tmp = (n - 1) // 2
tmp2 = (n + 3) // 2
S2 = S[:tmp]
S3 = S[tmp2 - 1:]
ans = S == S[::-1] and S2 == S2[::-1] and S3 == S3[::-1]
print('Yes' if ans else 'No')
def is_kaibun(s):
    n = len(s)
    for i in range(n):
        if s[i] != s[n-1-i]:
            return False
    return True

def is_tsuyoi(s):
    n = len(s)
    if not is_kaibun(s):
        return False
    if not is_kaibun(s[:(n-1)//2]):
        return False
    if not is_kaibun(s[(n+3)//2-1:]):
        return False

    return True

S = input()

print('Yes' if is_tsuyoi(S) else 'No')
S=input()
A=S[0:int((len(S)-1)/2)]
B=S[int((len(S)+3)/2):-1]
def kaibun(s):
    a,b="",""
    for i in range(len(s)):
        a = a+s[i]
        b = s[i]+b
    return a==b
print('Yes' if (kaibun(S) and kaibun(A) and kaibun(B)) else 'No')
s = input()
s_r = s[::-1]
ans = "No"
if s == s_r:
    ss = s[:int((len(s) - 1) / 2)]
    ss_r = ss[::-1]
    if ss == ss_r:
        sss = s[int((len(s) + 3) / 2) - 1:]
        sss_r = sss[::-1]
        if sss == sss_r:
            ans = "Yes"
print(ans)
s=input()
n=len(s)
s1=s[:(n-1)//2]
s2=s[n+3//2:]
def ispalindrome(str):
    if str==str[::-1]:
        s1=s[:(n-1)//2]
        if s1==s1[::-1]:
            s2=s[n+3//2:]
            if s2==s2[::-1]:
                return 'Yes'
            return 'No'
        return 'No'
    else:
        return 'No'
print(ispalindrome(s))
s = input()
n = len(s)
top = s[:(n-1)//2]
under = s[(n+1)//2:]

if s==s[::-1] and top==top[::-1] and under==under[::-1]:
  print("Yes")
else:
  print("No")
s=input()
wlist=[]
for ch in s:
  wlist.append(ch)
N=len(wlist)
F=int((N-1)/2)
A=int((N+3)/2)
r=0
for i in range(F-1):
  if wlist[i]!=wlist[N-1-i]:
    r=r+1
  if wlist[i]!=wlist[F-1-i]:
    r=r+1
  if wlist[A-1+i]!=wlist[N-1-i]:
    r=r+1
if r==0:
  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]]*(0,1)[lN == fN]])
S = input()

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

N = len(S)
l = S[0:(N-1)//2]
r = S[(N+3)//2 - 1:]
if l == r:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)

a = S[0:(N-1)//2]
b = S[N - (N-1)//2::]

if a == b: print("Yes")
else: print("No")
S = input()
n = len(S)
a=S[0:(n-1)//2]
b=S[(n+3)//2-1:0]
if S==S[::-1] and a==a[::-1] and b==b[::-1]:
    print("Yes")
else:
    print("No")
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
if s2 != s2[::-1]:
    flag = False
print("Yes") if flag else print("No")
s = input()
x = ''.join(list(reversed(s)))
n = len(s)
ans = 'No'
if s==x:
    a = s[:(n-1)//2]
    x = ''.join(list(reversed(a)))
    if a==x:
        b = s[(n+3)//2-1:]
        x = ''.join(list(reversed(b)))
        if b==x:
            ans = 'Yes'
print(ans)