peterverebics/CodeNet_Python_118 huggingface dataset:
def pali(s):
  l=len(s)
  p=True
  for i in range((l-1)//2):
    if s[i]!=s[l-i-1]:
      p=False
      break
  return p


s=input()
l=len(s)
s1=[]
s2=[]
for i in range ((l-1)//2):
    s1.append(s[i])
for i in range ((l+3)//2-1, l):
    s2.append(s[i])

superpali=pali(s) and pali(s1) and pali(s2)
if superpali:
    print ("Yes")
else:
    print("No")
S = "aacbaoooooo"

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

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

#flag= 1
for i in range(   (len(S) + 3 )//2-1,   (3 * len(S)-1)//4   ):
	if S[i] !=  S[(len(S) -1 )//2 -1 -i]:
		flag=0
	print(i)
print(flag)
s = input()
a = s[:len(s) // 2]
b = s[len(s) // 2 + 1:]
if a == a[::-1] and b == b[::-1] :
    print('Yes')
else:
    print('No')
s = input()
a = s[:len(s) // 2]
b = s[len(s) // 2 + 1:]
if a == b:
    a_a = s[:(len(a) + 3) // 2]
    a_b = s[(len(a) + 3) // 2 + 1:]
    if a_a == a_b:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s = input()

ans = 'Yes'

if s != s[::-1]:
  ans = 'No'
  
if s[:(len(s) - 1)//2] != s[(len(s) - 1)//2:]:
  ans = 'No'
  
if s[:(len(s) + 3)//2] != s[(len(s) + 1)//2:]:
  ans = 'No'
  
  
print(ans)
x = input()
if len(x) % 2 == 0 :
  adjust = 0
else:
  adjust = 1
xo = x[0:(len(x)-adjust)//2]
xr = ''.join(list(reversed(x[(len(x)+3)//2-1:])))
if xr == xo:
  print('Yes')
else:
  print('No')
s=input()
b=0
for i in range(len(s)):
  if s[i] != s[-i-1]:
    b=1
    break
for j in range(int((len(s)-1)/2)):
  if s[j] != s[-j-1]:
    b=1
    break
if b==1:
  print("No")
else:
  print("Yes")
s=input()
n=len(s)
a=s[0:(n-1)//2]
b=s[(n+3)//2-1:n]
c=a[::-1]
d=b[::-1]
for i in range(len(a)):
    if a[i]==c[i]:
        pass
    else:
        print("No")
        exit()
for i in range(len(b)):
    if b[i]==d[i]:
        pass
    else:
        print("No")
        exit()
print("Yes")
s = input()
n = len(s)
a = int((n-1)/2)
b = int((n+3)/2)
if n>0:
    x=s[:a]
    y = s[b-1:]
    if x==x[::-1] and y==y[::-1]:
      print("Yes")
    else:
      print("No")
else:
    print("No")
def f(x):
  x==x[::-1]
S=str(input())
N=len(S)
S1=S[:(N-1)//2]
S2=S[(N+1)//2:]
if f(S) and f(S1) and f(S2):
  print('Yes')
else:
  print('No')
def resolve():
    s = input()
    if len(s) == 3:
        print("Yes")
        exit()
    s1 = s[0:((len(s)-1)//2)]
    s2 = s[((len(s)+3)//2)-1:]
    rs1 = s1[::-1]
    rs2 =s2[::-1]
    if s1 == rs1 and s2 == rs2:
        print("Yes")
    else:
        print("No")
resolve()
# coding: utf-8
# Your code here!

def check(s):
    i = 0
    j = len(s)-1
    while i <= j:
        if s[i] != s[j]:
            return False
        i+=1
        j-=1
    return True
    

S = input()
mid = (len(S)-1)//2

if check(S[:mid]) and check(S[mid+1:]):
    print('Yes')
else:
    print('No')
S = input()
first = S[0:int(len(S) / 2)]
second= S[-1 * int(len(S) / 2):]

if first == first[::-1] and second == second[::-1]:
    print("Yes")
else:
    print("No")
def is_palindrome(n_str):
    return True if n_str == n_str[::-1] else False

def is_strong_palindrome(n_str):
    length = len(n_str)
    if is_palindrome(n_str) and is_palindrome(n_str[:(length-1)//2]) and is_palindrome(n_str[(length+3)//2-1:]):
        return 'Yes'
    else:
        return 'No'
    
s = input()
is_strong_palindrome(s)
S = input()
rev_S = reversed(S)
if list(rev_S) == list(S):
    print("Yes")
else:
    print("No")
s = input()

def palind(word):
    l = len(word)
    i=0
    j=l-1 
    while i <= j:
        if word[i] != word[j]:
            return False
        i += 1
        j -= 1
    return True

n = len(s)

if palind(s) and palind(s[:(((n-1)//2))]) and palind(s[(((n+3)//2)-1):]):
    print("YES")
else:
    print("NO")
s = input()

n = len(s)

firsthalf = s[:(n - 1)//2]
secondhalf = s[(n + 3)//2 - 1:]
#
# print(firsthalf)
# print(secondhalf)

revfirst = firsthalf[::-1]
revsecond = secondhalf[::-1]
#
# print(revfirst)
# print(revsecond)

if firsthalf == revfirst and secondhalf == revsecond:
    print('Yes')
else:
    print('No')
s=str(input())
def judge(s):
  l=len(s)
  if l%2==0:
    return 0
  else:
    pass
  for i in range((l-1)//2):
    if s[i]==s[-i-1]:
      pass
    else:
      return 0
  return 1
L=len(s)
if judge(s) and judge(s[0:(L-1)//2]) and judge(s[(L-1)//2+1:]):
  print('Yes')
else:
  print('No')
S=str(input())
N=len(S)
if str(S[1:int(N-1)//2])== str(S[int(N+3)//2:int(N)]):
  print('Yes')
else:
  print('No')
S=list(input())
N2=((int(len(S))//2))
SS=S[0:N2]
A=0
B=-1

while SS[A]==SS[B]:
    A+=1
    B-=1
    if A>int(len(SS)//2):
        break

if A==0:
    print("No")

X=tuple(SS)
Y=tuple(S[N2+1:])
if A!=0 and X==Y:
    print("Yes")
def main():
	s = str(input())
	s_1_mae = list(s[:(len(s)-1) // 2])

	s_2 = list(s[((len(s)+3)// 2) -1 :])
	
	if s_1_mae == list(reversed(s_1_mae)) and s_2 == list(reversed(s_2)):
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
	main()
S = input()
N = len(S)
S2 = S[:int((N-1)/2)]
S3 = S[int((N+3)/2-1):]

def kaibun(string):
    if len(string) > 1:
        if string[0] == string[-1]:
            return kaibun(string[1:-1])
        else:
            return 0
    else:
        return 1
if kaibun(S2) == 1:
    if kaibun(S3) == 1:
        print('Yes')
    else:
        print('No')
else:
    print('No')
import math
import sys 
s = input()
if s==s[::-1]:
    n = len(s)
    right = int((n-1)/2)
    print(right)
    tmp = s[:right]
    if tmp == tmp[::-1]:
        left = int((n+3)/2)
        tmp2 = s[left-1:]
        if tmp2 == tmp2[::-1]:
            print('Yes')
            sys.exit()
print('No')
a=input()
#b=reversed(a)
c=a[0:int((len(a)-1)/2)]
b=''.join(list(reversed(a)))
#d=reversed(a[int((len(a)+3)/2)-1:])
d=''.join(list(reversed(a[int((len(a)+3)/2)-1:])))
print(a,b,c,d)

if a!=b:
  print("No")
elif c!=d:
  print("No")
else:
  print("Yes")
def kaibun(mojiretu):
    leg = len(mojiretu)
    if leg == 1:
        return True
    mid = (leg-1) // 2
    if mojiretu[0:mid] != mojiretu[mid+1:]:
        return False
    return True

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()
n = len(s)
top = s[0:n//2]
under = s[n//2+1:n]

if top == top[::-1]:
  if under == under[::-1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")
s = input()
n = len(s)

i = 0
ans = 'Yes'
while 0 + i < n // 2 - 1 - i:
  if s[0] != s[n-1] or s[0] != s[n // 2 -1] or s[0] != s[n // 2 +1]:
    ans = 'No'
    break
  i += 1

print(ans)
s=input()
n=s
 
if s==reversed(s) and s[0:(n-1)//2]==reverses(s[0:(n-1)//2]) and s[((n+3)//2)-1:n]==reversed(s[((n+3)//2)-1:n]):
	print("Yes")
 
else:
	print("No")
S = list(input())
S1 = S[0:int((len(S) - 1) / 2)]
S2 = S[int((len(S) + 3) / 2) - 1:]

if len(S1) % 2 == 0:
    S3 = S1[0:int((len(S1) - 1) / 2) + 1]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]
else:
    S3 = S1[0:int((len(S1) - 1) / 2)]
    S4 = S1[int((len(S1) + 3) / 2) - 1:]

if S1 == S2 and S3 == S4 and not len(S1) == 1:
    print("Yes")
else:
    print("No")
import sys
s = input()
for i in range((len(s) - 1)//4):
    if s[i] != s[(len(s) - 1)//2 - i - 1] and s[i + len(s) // 2 + 1] != s[(len(s) - 1)//2 - i + len(s) // 2]:
        print("No")
        sys.exit(0)
print("Yes")
S = input()


def iskai(x):
  cnt=0
  for i in range(len(x)//2):
    if x[i] == x[len(x)-1-i]:
      cnt += 1
 
  if cnt == len(x)//2:
    return(True)
  else:
    return(False)
  
print(iskai(S))
def isKaibun(ss):    
    return ss==ss[::-1]

s = input()

n=len(s)

if isKaibun(s) and ((n-1)//2)%2 !=0 and isKaibun(s[:((n-1)//2)]):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
left = S[:(N // 2)]
right = S[((N + 3) // 2) - 1:]

if left == left[::-1] and right == right[::-1]:
    print('Yes')
else:
    print('No')
def ispalindrome(s):
  n = len(s)
  return all([s[i] == s[n-i-1] for i in range(n // 2)])

s = input()
n = len(s)
if ispalindrome(s) and ispalindrome(s[:(n-3)//2]) and ispalindrome(s[(n+1)//2:]):
  print("Yes")
else:
  print("No")
import sys
def is_anagram(s):
    return s == s[::-1]
S = input()
N = len(S)
if N == 3:
    print('No')
    sys.exit()

cond1 = int(((N-1)/2))
cond1 = S[0:cond1]
cond2 = int(((N+3)/2)-1)
cond2 = S[cond2:]
if is_anagram(cond1) and is_anagram(cond2):
    print('Yes')
else:
    print('No')
s = input()
n = s.__len__()
hn = ((n - 1) / 2).__int__()
qn = ((hn - 1) / 2).__int__()
ans = 'Yes'
for i in range(hn):
    if s[i] != s[n-1-i]:
        ans = 'No'
if hn % 2 == 0:
    ans = 'No'
for i in range(qn):
    if s[i] != s[hn-1-i]:
        ans = 'No'
print(ans)
s = input()
n = len(s)


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


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

def judge_palindrome(x):
	if x==x[::-1]:
		return True
	else:
		return False

if judge_palindrome(s) and judge_palindrome(s[:int((len(s)-1)/2)]) and judge_palindrome(s[int((len(s)+3)/2):]):
	print('Yes')
else:
	print('No')
S = input()

def pal(s):
  n = len(s)
  if s[: int((n-1)/2)] == s[int((n+3)/2 - 1) :]:
    return True
  else:
    return False

if pal(S):
  if pal(S[: int((len(S)-1)/2)]) and pal(S[int((len(S)+3)/2 - 1) :]):
    print("Yes")
    exit()

print("No")
def gaus(n):
    if n//1<n:
        return int(n+1)
    return int(n)
def hante(S):
    n=len(S)
    for i in range(n//2):
        if S[i]!=S[n-i-1]:
            return False
    return True
S=input()
S1=S[:len(S)//2]
S2=S[gaus(len(S)/2):]

if hante(S1)==True and hante(S2)==True:
    print("Yes")
else:
    print("No")
S = input()
cnt = 0
N = len(S)
for i in range(int((N-3)/2)):
    if S[i] == S[N-i-1]:
        cnt += 1
    else:
        pass
if cnt == (N-3)/2:
    print("Yes")
else:
    print("No")
def is_palindrome(s):
    if len(s) < 1:
        return True
    elif s != s[::-1]:
        return False

    return is_palindrome(s[:len(s) // 2]) and is_palindrome(s[len(s) // 2 + (1 if len(s) % 2 != 0 else 0):])


if __name__ == '__main__':
    s = input()

    print("Yes" if is_palindrome(s) else "No")
def is_kaibun(s):
  s_len = len(s)
  is_kaibun = True
  for i in range(s_len//2):
    is_kaibun = (s[i] == s[-(i+1)])
  return is_kaibun

s = input()
N = len(s)
s1 = s[:(N+1)//2-1]
s2 = s[(N+3)//2-1:]
if is_kaibun(s) and is_kaibun(s1) and is_kaibun(s2):
  print("Yes")
else:
  print("No")
s=input()
n=len(s)
i=0
j=0
if i<n:
    if s[i]==s[n-i-1]:
        if j<int((n-1)/2):
            if s[j]==s[int((n-1)/2-j-1)] and s[n-j-1]==s[int((n+3)/2+j-1)]:
                j+=1
                i+=1
                print("Yes")
            else:
                print("No")
s = input()
n = len(s)
l = (n-1)//2
r = (n+3)//2
if s[0:l] == s[0:l][::-1] and s[r-1:n] == s[r-1:n][::-1]:
    print('Yes')
else:
    print('No')
S=input()
N=len(S)
d1 = S[:(N-1)//2]
d2 = S[(N+2)//2:]
if d1 == d1[::-1] and d2 == d2[::-1]:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)

N_2 = (N+1) // 2 -1

if (N+1) % 4 == 0:
  N1 = N2 = (N+1) // 4 -1
  N3 = N4 = (N1+1) * 3 -1
else:
  N1 = (N-1) // 4 -1 
  N2 = N1 + 1
  N3 = N_2 + N1 +1
  N4 = N3 + 1
  
#print(N1, N2, N3, N4)
#print(S[0:N1+1], S[N2:N_2], S[N_2+1:N3+1], S[N4:N])

if S[0:N1+1] == S[N2:N_2][::-1] and S[N_2+1:N3+1] == S[N4:N][::-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()
def check(s):
  return s[:int((len(s)-1)/2+1)]==s[int((len(s)-1)/2):][::-1]
if check(S) and check(S[:int((len(S)-1)/2+1)]) and check(S[int((len(S)+3)/2):]):
  print('Yes')
else:
  print('No')
s = input()

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

n = len(s)
if pal(s) and pal(s[:(n-1)//2]) and pal(s[((n+3)//2) - 1:]):
  print('Yes')
else:
  print('No')
s=list(input())
t=list(reversed(s))
p=s[:(len(s) - 1) // 2]
q=list(reversed(p))
r=s[(len(s) - 1) // 2:]
u=list(reversed(r))
if s == t:
    if p == q:
        if r == s:
            print("Yes")        
else:
    print("No")
s=input();n=len(s)//2;print('YNeos'[s[n-1::-1]+s[:n]>s[-n:]*2::2])
import sys

s = sys.stdin.readline().strip()
l = len(s)

half = l // 2

left = s[:half]

if half % 2:
    right = s[half+1:]
else:
    right = s[half:]


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


if is_pal(s) and is_pal(left) and is_pal(right):
    print('Yes')
else:
    print('No')
S = list(input())

import sys
import math
flag1 = 0
flag2 = 0
flag3 = 0

if S == S[::-1]:
    flag1 = 1
    print(1)
else:
    print('No')
    sys.exit()

S1 = S[:(int((len(S) - 1)/2))]
if S1 == S1[::-1]:
    flag2 = 1
    print(2)
else:
    print('No')
    sys.exit()

S2 = S[int((len(S)+3)/2) - 1:]
if S2 == S2[::-1]:
    flag3 = 1
    print(3)
else:
    print('No')
    sys.exit()

if flag1 == 1 and flag2 == 1 and flag3 == 1:
    print('Yes')
s = input()

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

print(s1)
print(s2)
if s[::] == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print("Yes")
else:
	print("No")
s = input()
s = list(s)
n = len(s)
a = 1

if (n+1)%4 is not 0:
	print("No")

else:
	for i in range((n-3)//4):
		if s[i]!=s[(n-3)//2-i] or s[(n+1)//2+i]!=s[n-1-i]:

			a=0
			break
	#for i in range((n-3)//4):
		#if s[(n+1)//2+i]!=s[n-1-i]:
			#print("No")
			#break

	if a ==1:
		print("Yes")
	else:
		print("No")
s = input()
n = len(s)
c = 0
for i in range(int((n - 1)/2)):
  if (s[i] != s[n - 1 - i]):
    c = 1
x = int((n - 1)/2)
for i in range(int((x - 1)/2)):
  if (s[i] != s[x - 1 - i]):
    c = 1
if (c == 1):
  print("No")
else:
  print("Yes")
s = input()

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(s1) and isPalindrome(s2):
    print("Yes")
else:
    print("No")
def isBatch(s):
    for i in range(len(s)//2):
        if s[i] != s[-i-1]:
            return False
    return True

def main():
    s = input()
    condtion1 = (len(s) - 1) // 2 - 1
    condtion2 = (len(s) + 3) // 2 - 1
    flag = False
    for i, j in [(0, condtion1), (condtion2, len(s))]:
        if isBatch(s[i:j]):
            flag = True
        else:
            flag = False
    if flag:print("Yes")
    else: print("No")

if __name__ == "__main__":
    main()
s = list(input()) #gvg
l = len(s) # l = 3
j = l - 1 # j = 2

for i in range(l // 2):
    if s[i] != s[j]:
        print('No')
        exit(0)
    j -= 1

h = (l + 3) // 2 - 1
if h == 2:
    j = 0
else:
    j = h // 2

for h in range(l // 2):
    if s[h] != s[j]:
        print('No')
        exit(0)
    j -= 1

print('Yes')
S = str(input())
def palindrome(string): 
    return True if string==string[::-1] else False
    
if len(S) % 2 != 0 and palindrome(S) and palindrome(S[:int((len(S)-1)/2)]) and palindrome(S[int((len(S)+3)/2 + 1):]):
    print("Yes")
else:
    print("No")
string=input()
kaibun=list(string)
n=int(len(kaibun))

if kaibun==list(reversed(kaibun)):
  if (list(reversed(kaibun[:int((n-1)/2)]))==kaibun[:int((n-1)/2)]) and (list(reversed(kaibun[int((n+1)/2):]))==kaibun[int((n+1)/2):]):
      print("Yes")
  else:
      print("No")
import math

S = input()
flag = True
for i in range(math.ceil(len(S) / 2)):
    if S[i] != S[-i-1]:
        flag = False
        break

for i in range(math.ceil(len(S) / 4)):
    if S[i] != S[-i]:
        flag = False
        break

for i in range(math.ceil(len(S) / 2), len(S)):
    if S[i] != S[-i-1]:
        flag = False
        break


if flag:
    print("Yes")
else:
    print("No")
x = "malayalam"
w = "" 
for i in x: 
    w = i + w 
    if (x==w): print("YES")
    else: print("NO")
s = str(input())
n = len(s)
ng_list = [4*i+1 for i in range(1,25)]
i = 0

if n in ng_list:
    print("No")
else:
    county = 0
    for i in range(int((n-1)/4)):
        if s[i] != s[int((n-1)/2)-1-i] or s[i] != s[int((n+3)/2-1+i)] or s[i] != s[n-1-i]:
            print("No")
            break
        else:
            county += 1
    if county == int((n-1)/4):
        print("Yes")
s = input()
n = len(s)
flg = True
for i in range((n + 1) // 4):
    if s[i] != s[n // 2 - 1 - i]:
        flg = False
        break
    if s[(n + 3) // 2 - 1 + i] != s[n - 1 - i]:
        flg = False
        break

if flg:
    print("Yes")
else:
    print("No")
def is_palindrome(text):
  mid = len(text) // 2
  if text[:mid] == text[mid+1:][-1::-1]:
    return True
  else:
    return False

s = input()

mid = len(s) // 2

if len(s) < 6:
  print("No")
else:
  front = s[:mid]       # 前半
  back  = s[mid+1:]     # 後半
  if is_palindrome(front) and is_palindrome(back):
    if is_palindrome(s):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
s= input()
z=len(s)//2
flag=0
sd=s[0:z-1]
if sd==s[z+1:len(s)-1]:
    if sd==sd[::-1]:
        flag=1
if flag==1:
    print("Yes")
else:
    print("No")
import sys
input=sys.stdin.readline
S = list(input())
n0 = len(S)
s1 = S[0:n0 //2 ]
s2 = S[n0 // 2 +1:n0]
c = 0
n1 = len(s1)
for i in range(n1):
  if s1[i] != s2[i]:
    c = 1
    break
if c == 0:
  print("Yes")
else:
  print("No")
S = input()
S_before = S[:3]
S_after = S[-3:]

if (S_before[:1] == S_before[-1:]) and (S_after[:1] == S_after[-1:]):
    print('Yes')
else:
    print('No')
word = input()
N = int(len(word))
#1つ目
number1 = int((N-1)/2)
word1 = word[:number1]
count1 = 0
for i in range(int((number1 - 1)/2)):
  if word[i] == word[number1 - 1 - i]:
    count1 += 1
#2つ目
number2 = int((N-1)/2)
word2 = word[-number2+1:]
count2 = 0
for j in range(int((number2 - 1)/2)):
  if word[number2+1+j] == word[N-1-j]:
    count2 += 1
if count1+count2 == (number1 - 1):
  print("Yes")
else:
  print("No")
#!/usr/bin/env python3

s = list(str(input()))
N = len(s)


def disc(s):
    s1 = s[:len(s)//2]
    s2 = s[len(s)//2:]
    s2.reverse()
    if s1 == s2:
        return True
    else:
        return False


if disc(s) and disc(s[:(N-1)//2]) and disc(s[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")
s = list(input())
l = []
r = []

for i in range(int((len(s)-1)/2)):
    l.append(s[i])

for i in range(int((len(s)+1)/2),len(s)):
    r.append(s[i])

lr = l.copy()
lr.reverse()

rr = r.copy()
rr.reverse()

if l == lr and r == rr:
    print("Yes")
else:
    print("No")
s = input()
print('Yes' if s[0:3] == s[-3:] else 'No')
# String Palindrome
def is_palindrome(s):
    res = s == s[::-1]
    return res

S = input()
N = len(S)
ans = ['No', 'Yes'][is_palindrome(S[:((N-1)//2)]) & is_palindrome(S[((N+1)//2):])]
print(ans)
s = list(input())
a = s[:len(s)//2]
b = s[len(s)//2+1:]

flagA = True
for i in range(len(a)//2+1):
  if a[i] != a[len(a)-i-1]:
    flagA = False
    break
    
flagB = True
for i in range(len(b)//2+1):
  if b[i] != b[len(b)-i-1]:
    flagB = False
    break
    
if flagA and flagB:
  print("Yes")
else:
  print("No")
s = list(str(input()))
n = len(s)
N = int((n-1)/2)
M = int((n+3)/2)
l = []
m = []
for i in range(N):
    l.append(s[i])
for i in range (M-1,N):
    m.append(s[i])
a = ''.join(l)
b = ''.join(m)
l.reverse()
m.reverse()
A = ''.join(l)
B = ''.join(m)
if (a==A and b==B and a == b):
    print('Yes')
else:
    print('No')
S = str(raw_input())
N = len(S)
S1 = S[:(N-1)/2]
S2 = S[(N+1)/2:]

print(S1[::-1] == S[:(N-1)/2] and S2[::-1] == S[(N+1)/2:])
S = input()
N = len(S)
a=S[0:int((N-1)/2)]
b=S[int((N+3)/2-1):int((N))]

c=list(a)
d=sorted(c,reverse=True)

e=list(b)
f=sorted(e,reverse=True)

if a==b and c==d and e==f:
    print('Yes')
else:
    print('No')
# coding: utf-8
# Your code here!
S=list(input())
N=len(S)
T=S[:int((N-1)/2)]

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


if T==T[::-1] and U==U[::-1]:
    print("Yes")
else:
    print("No")
#print(T,U)
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)


if check(S) & check(S[:int((len(S)-1)/2)]) & check(S[int((len(S)+3)/2-1):]):
    print('Yes')
else:
    print('No')
s = list(input())
n = len(s)

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

alen = len(a)
blen = len(b)

for i in range(alen):
    if a[i] != a[alen - i - 1]:
        print("No")
        exit()

for i in range(blen):
    if b[i] != b[blen - i - 1]:
        print("No")
        exit()

print("Yes")
s=input()

s1=reversed(s)

if s==s1:
  print("YES")
else:
  print("NO")
S = input()
if len(S) % 2 == 0:
    print("No")
else:
    for i in range(len(S)+1):
        if i % 2 == 1:
            if S[i:i+2] == S[i+4:i+6]:
                print("Yes")
                break
            else:
                print("No")
                break
S = input()
L=len(S)
ans='No'
if S[:int((L-1)/2)]==S[int((L-1)/2-1)::-1] and S[int(L+3/2-1):]==S[:int((L+3/2)-2):-1]:
    ans='Yes'
print(ans)
s = [str(i) for i in input()]
n = len(s)

sa = s[0:(n-1)//2]
sb = s[(n+1)//2:n]

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

if palindrome(sa) and palindrome(sb):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
if (N+1)%4 == 0:
  if S == S[::-1]:
      if S[:int((N-1)/2)+1] == S[:int((N-1)/2)+1:-1]:
          print('Yes')
      else:
          print('No')
  else:
      print('No')
else:
  print('No')
s =input()
s = list(s)


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

def isStrong(S, i ,j):
    if i == j:
        return True
    elif (j-i)%2==1:
        mid = (j - i)//2
        if S[i:mid] != S[mid+1:j][::-1]:
            return False
    else:
        mid = (j - i - 1)//2
        if S[i:mid] != S[mid+1:j][::-1]:
            return False
    
    return isStrong(S, i, mid)
 
if isStrong(S, 0, len(S)):
    print("Yes")
else:
    print("No")
S = input()
N = len(S)

if S[::-1] != S:
    print("No")
    exit()

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

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

print("Yes")
def is_kaibun(string):
    for i in range(int(len(string)/2)):
        if string[i] != string[-i-1]:
            return False
    return True

s = input()
n = int(len(s)/2)

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

if is_kaibun(s1) == True:
  if s1 == s2:
    print('Yes')
else:
  print('No')
s = input()
n = len(s)

s_list = list(s)
r_list = list(s)
r_list.reverse()

first_s_list = s_list[0:(n - 1) // 2]
first_r_list = list(reversed(first_s_list))

last_s_list = s_list[(n + 2) // 2:n]
last_r_list = list(reversed(last_s_list))

if s_list == r_list and first_s_list == first_r_list and last_s_list == last_r_list:
    print('Yes')
else:
    print('No')


print(first_s_list, first_r_list)
print(last_s_list, last_r_list)
s = input()
S = list(s)
cnt = 0
l = int(len(s))
l = l // 2
for i in range(l + 1):
    if S[i] == S[-(1 + i)]:
        for j in range(l):
            if S[j] == S[-(l + 2 + j)]:
                cnt += 1


if cnt != 0:
    print('Yes')
else:
    print('No')
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("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().strip()
y, n = "Yes", "No"
if len(s) == 3:
    if s[0] == s[1]:
        print(y)
    else:
        print(n)
else:
    mid = len(s)//2
    if s[0:mid] == s[mid+1:len(s)]:
        print(y)
    else:
        print(n)
S = input()
N = len(S)
s1 = S[:(N-1)//2]
s2 = S[(N+3)//2-1:]
if s1 == s1[::-1] and s2 == s2[::-1]:
    print('Yes')
else:
    print('No')
S = input()
N = len(S)


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

ans = "No"
if a == a[::-1] and b == b[::-1]:
    ans = "Yes"

print(ans)