peterverebics/CodeNet_Python_118 huggingface dataset:
# https://atcoder.jp/contests/abc159/tasks/abc159_b

S = input()
N = len(S)
S_2 = S[: int((N - 1) / 2)]
S_3 = S[int(((N + 3) / 2)) - 1: ]

if S == S[:: -1] and S_2 == S_2[:: -1] and S_3 == S_3[:: -1]:
    print('Yes')

else:
    print('No')
s = list(input())
n = len(s)

s1 = [s[i] for i in range((n-1)//2)]
s2 = [s[i] for i in range((n+3)//2-1, n)]

sr = list(reversed(s))
s1r = list(reversed(s1))
s2r = list(reversed(s2))

if s == sr and s1 == s1r and s2 == s2r:
    print('Yes')
else:
    print('No')
s = input()
n = len(s)

if s != s[::-1]:
    print('No')
    exit()

s2 = s[:int((n-1)/2)]
if s2 != s2[::-1]:
    print('No')
    exit()

s3 = s[int((n+3)/2-1):]
if s3 != s3[::-1]:
    print('No')
    exit()

print('Yes')
##B
S = str(input())
N = int(len(S))
##print(N)
S1 = S[0:(N-1)//2]
N1 = len(S1)
S2 = S[(N+3)//2-1:N]
N2 = len(S2)

if S1 == S2:
    if S1 == S1[::-1]:
        if S2 == S2[::-1]:
            print("Yes")
else:
    print("No")
S = input()
N = len(S)

if S == S[::-1]:
  Sfor = S[:int((N-1)/2)]
  if Sfor == Sfor[::-1]:
    Slat = S[int((N+1)/2):]
    if Slat == Slat[::-1]:
      print("Yes")
    else:
      print("No")
  else:
    print("No")   
else:
  print("No")
S = input()
n = len(S)
S1 = S[0:int((n-1)/2)]
S2 = S[int((n+3)/2-1):n]

if (S[::-1] == S) and (S1[::-1] == S1) and S2[::-1] == S2:
    print("Yes")
else:
    print("No")
# coding: utf-8
# Your code here!
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read


#n,m = [int(i) for i in read().split()]

s = input()

n = len(s)
t = s[:(n-1)//2]
u = s[(n-1)//2+1:]

if s==s[::-1] and t==t[::-1] and u==u[::-1]:
    print("Yes")
else:
    print("No")
def kalin(s):
  N=len(s)
  for i in range(N//2):
    if s[i]!=s[-1-i]:
      return False
  return True

def strong(s):
  N=len(s)
  tail = (N-1)//2
  s0=s[0:tail]
  head = (N+3)//2
  s1=s[head-1:]
  # print('s0={} s1={}'.format(s0,s1))
  return kalin(s0) and kalin(s1) and kalin(s)  

if strong(input()):
  print('Yes')
else:
  print('No')
def is_kaibun(s):
    for i,c in enumerate(s):
        if c != s[len(s)-i-1]:
            return False
        if i > len(s)//2:
            break
    return True


s = input()
ans = "Yes"
if not is_kaibun(s):
#    print("S is not kaibun")
    ans ="No"
if not is_kaibun(s[0:(len(s)-1)//2]):
#    print("S-1 is not kaibun")
    ans ="No"
if not is_kaibun(s[(len(s)+3)//2-1:]):
#    print("S+3 is not kaibun")
    ans ="No"
print(ans)
# print('input >>')

S = input()

N = len(S)

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

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

# print('-----output-----')
import sys
input = sys.stdin.readline

s = input().replace("\n","")

reverse_s = s[::-1]

s1len = int((len(s)/2))

s1 = s[:s1len]
reverse_s1 = s1[::-1]
# print(s1)

s2len = int((len(s)/2) + 1)
s2 = s[s2len:]
reverse_s2 = s2[::-1]
# print(s2)


if (s == reverse_s) and (s1 == reverse_s1) and (s2 == reverse_s2):
    print("Yes")
else:
    print("No")
def ispalindrome(str): return 1 if str == str[::-1] else 0


def resolve():
    S = list(input())

    if not ispalindrome(''.join(S)):
        print('No')
        return

    num = len(S)
    half = num // 2

    half_1 = S[0:half]
    half_2 = S[half + 1:]

    if not ispalindrome(''.join(half_1)):
        print('No')
        return

    if not ispalindrome(''.join(half_2)):
        print('No')
        return

    print('Yes')


resolve()
S = str(input())
N = len(S)
if S == S[::-1] and S[:(N-1)//2] == S[(N-1)//2-1::-1] and S[(N+3)//2-1:N] == S[-1:(N+3)//2-2:-1]:
  print("Yes")
else:
  print("No")
S = input()
N = len(S)#7
a = 0
f = (N-1)//2
for i in range(N):
    if S[i] != S[-i-1]:
        a = 1
for i in range(f):
    if S[i] !=S[f-i-1]:
        a = 1
b = 0
for j in range((N+3)//2-1,N):
    b += 1
    if S[j] != S[N-b]:
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")
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)

sta = (N - 1) // 2
end = (N + 3) //2

if is_kaibun(S):
    if is_kaibun(S[0:sta]):
        if is_kaibun(S[end - 1:]):
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")
S = list(input())
N = len(S)
ans = "Yes"

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

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

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

print(ans)
s = input()
n = len(s)
a = s[:(n-1)//2]
b = s[((n+3)//2)-1:]
if a == b:
    a_rev = a[::-1]
    b_rev = b[::-1]
    if a == a_rev and b == b_rev:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s=list(input())
c=list(reversed(s))
n=len(s)
t=list(s[:int((n-1)/2)])
a=list(reversed(t))
u=list(s[int((n+3)/2)-1:])
b=list(reversed(u))
#print(b)
if t==a and u==b and s==c:
    print("Yes")   
else:
    print("No")
def isKaibun(str):
    isKaibun = True
    length = len(str)
    for i in range(length):
        if str[i] != str[length - i - 1]:
            isKaibun = False
            break
    return isKaibun

# 整数の入力
S = input()

N = len(S)

output = "No"

flag1 = isKaibun(S)
flag2 = isKaibun(S[0 : int(((N-1)/2))])
flag3 = isKaibun(S[int(((N+3)/2)-1): N])

if flag1 and flag2 and flag3:
    output = "Yes"

###########　出力
print(output)
s = input()

n = len(s)
if s == s[::-1]:
    t = s[:(n-1)//2]
    if t == t[::-1]:
        u = s[(n+3)//2-1:]
        if u == u[::-1]:
            print('Yes')
            exit()

print('No')
S = input()
N = len(S)

A = S[:int((N-1)/2)]
B = S[int((N+3)/2)-1:]
# print(S,A,B)
# def palindrome(string): return 
#     string.find(string[::-1])
def palindrome(string): return 1 if string==string[::-1] else 0

# print(palindrome(S),palindrome(A),palindrome(B))
if palindrome(S) and palindrome(A) and palindrome(B):
    print('Yes')
else:
    print('No')
s=input()

n = len(s)
count = 0

before = int((n-1)/2)
after = int((n+1)/2)

if s[:before] != s[after:]:
    count += 1

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

if s != s[::-1] or s1 != s1[::-1] or s2 != s2[::-1]:
    print('No')
else:
    print('Yes')
S=input()
T=S[:(len(S)-1)//2]
U=S[(len(S)+3)//2-1:]
if S==S[::-1]:
    if T==T[::-1]:
        if U==U[::-1]:
            print('Yes')
        else:print('No')
    else:print('No')
else:print('No')
s = input()
n = len(s)
a, b = (n-1)//2, ((n+3)//2)-1
if s[0:a] == ''.join(reversed(s[0:a])) and s[b:] == ''.join(reversed(s[b:])) and s == ''.join(reversed(s)):
	print("Yes")
else:
	print("No")
letter=input()
def isKaibun(s):
  res = True
  for i in range(int((len(s))/2)):
    if s[i] != s[-1-i]:
      res = False
      break
  return res
if isKaibun(letter[0:int((len(letter)-1)/2)]):
  if isKaibun(letter[int((len(letter)+3)/2-1):]):
    if isKaibun(letter):
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')
s = list(input())
n = len(s); flag= 0
if s == s[::-1]:    flag += 1 ;
start, end = 0, ((n-1)//2)-1
while(end > start and flag == 1):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
start, end = (n+3)//2 -1, (n-1)
while(end > start and flag == 2):
    if not(s[start] == s[end]):        break;
    start += 1 ; end -= 1
else:    flag += 1
print('Yes' if flag == 3 else 'No')
S=input()
N=len(S)

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

S_all=is_palindrome(S)
S_forward=is_palindrome(S[:(N-1)//2])
S_rear=is_palindrome(S[(N+3)//2-1:])

if (S_all==True  and S_forward==True)  and S_rear==True:
    print("Yes")
else:
    print("No")
S = input()
N = len(S)
left = S[:int((N-1)/2)]
right = S[int((N+3)/2)-1:]

if S != S[::-1]:
  print("No")
  exit()
if left != left[::-1]:
  print("No")
  exit()
if right != right[::-1]:
  print("No")
  exit()
print("Yes")
def check(string2):
	N = len(string2)
	rev = string2[::-1]
	for i in range((N//2)+1):
		if(rev[i]!=string2[i]):
			return False
	return True


string = input()
n = len(string)
n-=1
str1 = string[0:int((n)/2)]
# print(str1)
str2 = string[int((n)/2)+1:n+1]
# print(str2)
if check(str1) and check(str2) and check(string):
	print("Yes")
else:
	print("No")
def ispalindrome(str): return 1 if str == str[::-1] else 0

sta = input()
N = len(sta)
sta_a = sta[0:(N-1)//2]
sta_b = sta[(N-1)//2+1:]


if ispalindrome(sta) and ispalindrome(sta_a) and ispalindrome(sta_b):
  print("Yes")
else:
  print("No")
# 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

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

if ss != tt:
    f = 0

if f:
    print('Yes')
else:
    print('No')
def main():
  s = input()
  if s != s[::-1]:
    print('No')
    return
  a = s[:(len(s)-1)//2]
  if a != a[::-1]:
    print('No')
    return
  b = s[(len(s)+1)//2:]
  if b != b[::-1]:
    print('No')
    return
  print('Yes')
  return

main()
s = input()
n = len(s)

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

s1_rev = s1[::-1]
s2_rev = s2[::-1]

if s == s[::-1]:
    if s1 == s1_rev and s2 == s2_rev:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s = input().split()[0]
n = len(s)
l = s[:n//2]
r = s[n//2+1:]
cnt = 0
for i in range(n//2):
    if l[i] == l[n//2 - 1 - i]:
        cnt += 1
    if r[i] == r[n//2 - 1 - i]:
        cnt += 1
if l == r and cnt == n - 1:
    print('Yes')
else:
    print('No')
s = list(input())
n = len(s)
flg = True
s4 = reversed(s)
if s != s[::-1]:
    flg = False
s2 = s[0:((n-1)//2)]
s5 = reversed(s)
if s2 != s2[::-1]:
    flg = False
s3 = s[(n+3)//2 -1:n]
s6 = reversed(s)
if s3 != s3[::-1]:
    flg = False
if flg == True:
    print('Yes')
else:
    print('No')
#print(s[::-1])
s = input()
m = (len(s) - 1) // 2
l = s[:m]
r = s[(len(s) + 3) // 2 - 1:]


def check(s):
    mid = len(s) // 2
    if len(s) % 2 != 0:
        left = s[:mid]
        right = s[mid+1:]
    else:
        left = s[:mid]
        right = s[mid:]
    if left == right[::-1]:
        return True
    else:
        return False

if check(s) and check(r) and check(l):
    print("Yes")
else:
    print("No")
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())
# list(map(int, input().split()))

S = input()
N = len(S)

l = S[:N//2]
r = S[N//2 + 1:]

if S == S[::-1] and l == l[::-1] and r == r[::-1]:
    print("Yes")
else:
    print("No")
s=input()
if len(s)%2==0:
  
  if s[:len(s)//2]==s[len(s)//2:]:
    print("Yes")
  else:
    print("No")
else:
  if s[:len(s)//2]==s[len(s)//2+1:]:
    print("Yes")
  else:
    print("No")
st = input()

n = len(st)
half = (n-1)//2

if st[0:half] == st[n-1:half:-1]:
  if half%2 == 0:
    qu = half//2
    if st[:qu] == st[half-1:qu-1:-1] and st[half+1:half+qu+1] == st[n-1:half+qu:-1]:
      print("Yes")
    else:
      print("No")  
  else:
    qu = (half-1)//2
    if st[:qu] == st[half-1:qu:-1] and st[half+1:half+qu+1] == st[n-1:half+qu+1:-1]:
      print("Yes")
    else :
      print("No") 

else:
  print("No")
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()
    N = len(S)

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

    return


if __name__ == '__main__':
    main()
a = list(input())
if a[:(len(a)-1)//2] == a[((len(a)+3)//2)-1:] and a[:(len(a)-1)//2] == a[::-1][:(len(a)-1)//2]:
    print('Yes')
else:
    print('No')
iss = lambda x:x == x[::-1]
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]
print("Yes" if iss(S) and iss(S1) and iss(S2) else "No")
s = input()
l = len(s)//2
s_ = s[::-1]
s1 = s[:l]
s1_ = s1[::-1]
s2 = s[l+1:]
s2_ = s2[::-1]
 
if s == s_ and s1 == s1_ and s2 == s2_:
    print("Yes")
else:
    print("No")
s = list(input())
n = len(s)
if s == s[::-1] and s[:(n-1)//2] == s[:(n-1)//2][::-1] and s[(n+3)//2-1:n] == s[(n+3)//2-1:n][::-1]:
    print('Yes')
else:
    print('No')
import numpy as np
S = list(input())
N = len(S)
A = []
B = []
for i in range((N-1)//2):
    A.append(S[i])
for j in range((N-1)//2):
    B.append(S[((N+3)//2)+(j-1)])

C = list(reversed(A))
D = list(reversed(B))
E = list(reversed(S))

if np.count_nonzero(np.array(A) == np.array(C)) == np.count_nonzero(np.array(B) == np.array(D)) == len(A) and np.count_nonzero(np.array(S) == np.array(E)) == len(S):
    print("Yes")
else:
    print("No")
def fn1(s):
	return s == s[::-1]
def fn2(s):
	n = len(s)
	x = s[:(n-1)//2]
	return x == x[::-1]
def fn3(s):
	n = len(s)
	x = s[(n+1)//2:]
	return x == x[::-1]

s = input()

if fn1(s) and fn2(s) and fn3(s):
	print('Yes')
else:
	print('No')
s=input()
n=len(s)
if s==s[::-1] and s[:(n-1)//2]==s[:(n-1)//2][::-1] and s[(n+3)//2-1::]==s[(n+3)//2-1::][::-1]:
  print("Yes")
else:
  print("No")
def Main(S):
    N = len(S)
    r_S = S[::-1]
    A = S[:(N-1)//2]
    r_A = A[::-1]
    B = S[(N+1)//2:]
    r_B = B[::-1]
    return "Yes" if S == r_S and A == r_A and B == r_B else "No"
    

def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

s = input().rstrip()
n = len(s)

t = s[0:(n-1)//2]
q = s[(n+2)//2:n]

if s == s[::-1] and t == t[::-1] and q == q[::-1]:
    print("Yes")
else:
    print("No")
s=input()
n=len(s)
count=0
a=(n-1)//2
b=(n+3)//2
for i in range(n//2):
  if s[i]!=s[-abs(i+1)]:
    count+=1
    
for i in range(a//2):
  if s[i]!=s[(a-1-i)]:
    count+=1

for i in range((n-b+1)//2):
  if s[-(i+1)]!=s[b-1+i]:
    count+=1

if count!=0:
  print('No')
else:
  print('Yes')
s = list(input())
if s == list(reversed(s)) and s[:len(s)//2] == list(reversed(s[:len(s)//2])):
  print("Yes")
else:
  print("No")
s=input()
si=s[::-1]
a=s[:(len(s)-1)//2]
b=s[(len(s)+1)//2:]
if s == si :
    if a == a[::-1] and b == b[::-1]:
        print(("Yes"))
        exit()
print("No")
S = input()
N = len(S)

a = (N-1)//2

def isKaibun(S):
    N = len(S)
    flag = 0
    for i in range((N//2)+1):
        if S[i] != S[N-1-i]:
            flag =1
    if flag == 1:
        return False
    else:
         return True

if isKaibun(S[0:a]) == True:
    if isKaibun(S[-1:-a-1:-1]) == True:
        if isKaibun(S) == True:
            print("Yes")
            exit()
print("No")
S = input()
N = len(S)
reverse = S[::-1]
first = S[:(N - 1) // 2]
second = S[(N + 1) // 2:]

if S == reverse and first == second:
    print("Yes")
else:
    print("No")
def is_palindrome(s):
  if s == s[::-1]:
    return True
  else:
    return False
  
s = input()
if is_palindrome(s) and is_palindrome(s[:len(s)//2]) and is_palindrome(s[len(s)//2+1:]):
  print('Yes')
else:
  print('No')
S=input()
N=len(S)

if S!=S[::-1]:
    print("No")
elif S[:(N-1)//2]!=S[(N-1)//2-1::-1]:
    print("No")
elif S[(N+3)//2-1:]!=S[:(N-1)//2:-1]:
    print("No")
else:
    print("Yes")
S = input()
N = len(S)
K = (N-3)//2
if S == S[::-1] and S[0:K] == S[K:0:-1]:
    print ('Yes')
else:
    print ('No')
s = input()

n = len(s)
a = (n - 1) // 2
b = (n + 3) // 2

s_reverse = s[::-1]

s_first = s[:a]
s_first_reverse = s_first[::-1]

s_second = s[b-1:]
s_second_reverse = s_second[::-1]

if s == s_reverse and s_first == s_first_reverse and s_second == s_second_reverse:
  print('Yes')
else:
  print('No')
S = input()
N = len(S)

def isOk(s):
    for s, t in zip(s, s[:: -1]):
        if s != t:
            return False
    return True

for s in [S, S[:(N - 1) // 2], S[(N + 3) // 2 - 1:]]:
    if not isOk(s):
        print('No')
        exit()

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

    n1=(len(s)-1)//2
    n2=(len(s)+2)//2
    s1=s[0:n1]
    s2=s[n2:len(s)]
    if s==s[::-1] and s1==s1[::-1] and s2==s2[::-1]:
        print("Yes")
    else:
        print("No")
import sys
# input = sys.stdin.buffer.readline
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 7)

S = input()
n = len(S)

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

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

if s == s[::-1]:
    s1 = s[: len(s) // 2]
    s2 = s[(len(s) // 2) + 1:]
    if s1 == s2:
        print('Yes')
    else:
        print('No')
else:
    print('No')
s=str(input())
n=len(s)

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

new_n1=int((n-1)/2)
new_s1=s[:new_n1]

new_n2=int((n+3)/2)
new_s2=s[new_n2-1:]
for i in range(0,len(new_s1)):
 if new_s1[i]!=new_s1[-i-1]:
    print("No")
    exit()
else:
  pass
for i in range(0,len(new_s2)):
 if new_s2[i]!=new_s2[-i-1]:
    print("No")
    exit()
else:
  print("Yes")
import sys
s = input()
pre = []
back = []
for i in range((len(s)-1)//2):
    pre.append(s[i])
s1 = ''.join(pre)

for i in range((len(s)+3)//2-1,len(s)):
    back.append(s[i])
s2 = ''.join(back)

if s != s[::-1]:
    print('No')
    sys.exit()
elif s1 != s1[::-1]:
    print('No')
    sys.exit()
elif s2 != s2[::-1]:
    print('No')
    sys.exit()
print('Yes')
S = input()
N = len(S)

end = (N-1)//2
stt = (N+3)//2

S1 = S[:end]
S2 = S[stt-1:]

if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1]:
  print('Yes')
else:
  print('No')
def is_kaibun(string):
    for i in range(int(len(string)/2)):
        if string[i] != string[-i-1]:
            return False
    return True

s=input()
list_s=list(s)
n=len(list_s)
m=int((n-1)/2)
if list_s[0:m] == list(reversed(list_s[m+1:])):
    if is_kaibun(s[0:m]):
        print("Yes")
    else:
        print("No")
else:
    print("No")
s = input()
mr = s[::-1]
n = len(s)
f = 1

if s == mr:
  pass
else:
  f = 0
  
# ------------------------------

s2 = s[:((n-1)//2)]
mr = s2[::-1]

if s2 == mr:
  pass
else:
  f = 0


# ------------------------------
  
s3 = s[((n+3)//2)-1:]
mr = s3[::-1]

if s3 == mr:
  pass
else:
  f = 0
  
if f == 1:
  print("Yes")
else:
  print("No")
# ABC 159: B – String Palindrome
S = input()
N = len(S)

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

print('Yes' if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else 'No')
#n, m = list(map(int,input().split()))

s = input()
f = True

if s[::-1] != s:
    f = False

t = s[:(len(s)-1)//2]
if t != t[::-1]:
    f = False

t = s[(len(s)+3) // 2 - 1:]
if t != t[::-1]:
    f = False

if f:
    print('Yes')
else:
    print('No')
s = list(str(input()))

n = len(s)
k = int((n+3)/2 - 1)
flag = 0
for i in range(n-1):
    if not s[i] == s[n-1-i]:
        break
else:
    flag += 1

for i in range(int((n-1)/2)):
    if not s[i] == s[int((n-1)/2 - 1 - i)]:
        break
else:
    flag += 1

for k in range (n):
    if not s[k] == s[n-1-k]:
        break
else:
    flag += 1

if flag == 3:
    print("Yes")
else:
    print("No")
S = list(input())
#print(S)
#print(len(S))

a=int((len(S)-1)/2)

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[:a]) and is_kaibun(S[a+1:]):
        print('Yes')

else:
    print('No')
S = input()
N = len(S)
S1 = S[:(N-1)//2]
S2 = S[(N+3)//2-1:]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")
S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")
s=input()
flag=0
for i in range(len(s)):
  if s[i]!=s[len(s)-1-i]:
    flag=1
for i in range(int((len(s)-1)/2)):
  if s[i]!=s[int((len(s)-1)/2)-1-i]:
    flag=1
for i in range(int((len(s)+3)/2)-1,len(s)):
  if s[i]!=s[len(s)-1-i]:
    flag=1
if flag==1:
  print("No")
else:
  print("Yes")
def resolve():
    S = str(input())
    S_size = len(S)
    S_reverse = S[::-1]
    count = (S_size - 1) / 2
    next_s = S[0:int(count)]
    extt2_s = S[int((S_size + 3) / 2)::S_size]

    if S == S_reverse and next_s == next_s[::-1] and extt2_s == extt2_s[::-1]:
        print("Yes")
    else:
        print("No")
resolve()
s = input()
n = len(s)
judge = 1
for i in range(int(n / 2)):
    if s[i] != s[n - 1 - i]:
        judge = 0
        break

for i in range(int((n - 1) / 4)):
    if s[i] != s[int((n - 1) / 2 - 1 - i)]:
        judge = 0
        break

for i in range(int((n + 3) / 2), n):
    if s[i] != s[n - 1 - i]:
        judge = 0
        break

print("Yes" if judge == 1 else "No")
import sys


def is_palindrome(s):
    if len(s) % 2:
        a, b = s[:len(s) // 2], s[len(s) // 2 + 1:]
    else:
        a, b = s[:len(s) // 2], s[len(s) // 2:]
    return a == ''.join(reversed(b))


def resolve(in_):
    s = in_.readline().strip()
    ret = is_palindrome(s) and is_palindrome(s[:len(s) // 2]) and is_palindrome(s[len(s) // 2 + 1:])
    return 'Yes' if ret else 'No'


def main():
    answer = resolve(sys.stdin)
    print(answer)


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

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

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

if check(s)==True and check(s[:(len(s)-1)//2])==True and check(s[(len(s)+3)//2-1:])==True:
    print("Yes")
else:
    print("No")
import sys
s = input()
if s == s[::-1]:
    x = s[:(len(s)-1)//2]
    if x == x[::-1]:
        y = s[(len(s)+3)//2 -1:]
        if y == y[::-1]:
            print('Yes')
            sys.exit()
print("No")
def kaibun(s):
    rev = ''.join(list(reversed(s)))
    #print(rev)
    if s == rev:
        return True

def main():
    S = input()
    N = len(S)

    if kaibun(S) and kaibun(S[:(N-1)//2]) and kaibun(S[(N+1)//2:]):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
# B - String Palindrome
# https://atcoder.jp/contests/abc159/tasks/abc159_b

import sys

S = input()
N = len(S)

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

if not is_palindrome(S):
    print("No")
    sys.exit()

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

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

print("Yes")
S = str(input())
N = len(S)
cut1 = S[0:int((N-1)/2)]
cut2 = S[int((N+3)/2-1):N]
if S==S[::-1] and cut1==cut1[::-1] and cut2==cut2[::-1]:
    print('Yes')
else:
    print('No')
def inpl():
    return list(map(int, input().split()))


S = input()
N = len(S)


def palidrome(S):
    return all(a == b for a, b in zip(S, S[::-1]))


if palidrome(S) and palidrome(S[:(N - 1) // 2]) and palidrome(
        S[(N + 1) // 2:]):
    print("Yes")
else:
    print("No")
s = input()
# 文字数の処理があるからlenで長さとる
n = len(s)
# 半分までがleft
sl = s[:n//2]
# 半分+1(中央を飛ばしてから)を始点としてright（奇数だから）
sr = s[n//2+1:]
# 範囲を全指定にしてマイナスステップにすると、要素がリバースする。
# 右半分が回文で左も一緒なら強い回文と言える
if sl == sr and sr ==  sr[::-1]:
    print('Yes')
else:
    print('No')
s = input()
if s != s[::-1]:
    print('No')
elif s[:len(s) // 2] != s[:len(s) // 2][::-1]:
    print('No')
elif s[len(s) // 2 + 1:] != s[len(s) // 2 + 1:][::-1]:
    print('No')
else:
    print('Yes')
s=input()
n=len(s)
ans="Yes"
for i in range(n//2):
    if s[i]!=s[n-1-i]:
        ans="No"
for j in range(n//2):
    if s[i]!=s[n//2-1-i]:
        ans="No"
for j in range(n//2):
    if s[n//2+1+i]!=s[-1-i]:
        ans="No"


print(ans)