Problem:
 Score : 200 points    Problem Statement A string S of an odd length is said to be a strong palindrome if and only if all of the following conditions are satisfied:   S is a palindrome.  Let N be the length of S . The string formed by the 1 -st through ((N-1)/2) -th characters of S is a palindrome.  The string consisting of the (N+3)/2 -st through N -th characters of S is a palindrome.   Determine whether S is a strong palindrome.      Constraints  S consists of lowercase English letters.  The length of S is an odd number between 3 and 99 (inclusive).         Input Input is given from Standard Input in the following format:  S       Output If S is a strong palindrome, print Yes ;
otherwise, print No .        Sample Input 1 akasaka      Sample Output 1 Yes   S is akasaka .  The string formed by the 1 -st through the 3 -rd characters is aka .  The string formed by the 5 -th through the 7 -th characters is aka .
All of these are palindromes, so S is a strong palindrome.        Sample Input 2 level      Sample Output 2 No       Sample Input 3 atcoder      Sample Output 3 No

Solution (Python):
import sys
s = input()
n = len(s)
if n % 2 == 1:
    if s == s[::-1]:
        if s[:(n-1)//2] == s[:(n-1)//2][::-1]:
            if s[(n+1)//2:] == s[(n+1)//2:][::-1]:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s = list(str(input()))
n = len(s)
ans = False
s1 = s
s2 = s[:(n-1)//2]
s3 = s[(n+3)//2-1:]
if s1 == s1[::-1] and s2 == s2[::-1] and s3 == s3[::-1]:
    ans = True
if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
def isparin(t):
    
    M=len(t)
    for i in range(M):
        if t[i]!=t[M-1-i]:
            return False
    return True

S=input()
N=len(S)

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

Solution (Python):
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

S = read().decode().rstrip()

f_half = S[:len(S) // 2]
s_half = S[(len(S) + 2) // 2:]

if f_half == s_half:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
def palin(s):
  p = 1
  n = len(s)
  for i in range(n//2):
    if s[i] != s[n-i-1]:
      p = 0
      break
  return p == 1
if palin(S) and palin(S[:(N-1)//2]) and palin(S[(N+2)//2:]):
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
l = len(s)


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

if is_kaibun(s) and is_kaibun(s[0:(l-1)//2]) and is_kaibun(s[(l+1)//2:]):
    print('Yes')
else:
    print('No')

Solution (Python):

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

def main():
    S = input()
    N=len(S)
    if kai(S) and kai(S[:(N-1)//2]) and kai(S[(N+1)//2]):
        return "Yes"
    return "No"

print(main())

Solution (Python):
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")

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    s = input().strip("\n")
    N = len(s)
    rev = ""
    for i in reversed(range(N)): rev += s[i]
    if s == rev:
        revl = ""
        revr = ""
        for i in reversed(range((N - 1) // 2)): 
            revl += s[i]
        for i in reversed(range((N + 3) // 2 - 1, N)):
            revr += s[i]
        if s[:(N-1)//2] == revl and s[(N+3)//2 - 1: N] == revr: print("Yes")
        else: print("No")
        
    else: 
        print("No")

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
s = "x" + input()
n = len(s)

a = s[1:]
l = s[1:(n-1)//2 + 1]
r = s[(n+3)//2:]

if a == a[::-1] and l == l[::-1] and r == r[::-1]:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Solution (Python):
S=input().strip()
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")

Solution (Python):
S = input()
yes = True

for num in range(len(S)):
    if S[num] != S[len(S)-num-1]:
        yes = False

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

for num in range(len(S)):
    if S[num] != S[len(S)-num-1]:
        yes = False

if yes == True:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
check = True
for i in range(len(s)):
    if s[i] != s[-1 - i]:
        check = False
s = s[:len(s)//2]
for i in range(len(s)):
    if s[i] != s[-1 - i]:
        check = False
print("Yes" if check else "No")

Solution (Python):
s = input()
n = len(s)
t = s[:n // 2]
u = s[n // 2 + 1:]
print(["No", "Yes"][s == s[::-1] and t == t[::-1] and u == u[::-1]])

Solution (Python):
s=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:] == s[:(n+3)//2-2:-1] :
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
N = len(S)
def check(s):
    return s == s[::-1]

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
S = input().strip()

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

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

Solution (Python):
s = input()

ls = s[:int((len(s)-1)/2)]
rs = s[int((len(s)-1)/2)+1:]

if ls == rs:
    print('Yes')
else:
    print('No')

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

Solution (Python):
def pal(s):
    if s==s[::-1]:
        return True 
    return False


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

Solution (Python):
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")

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

    return True

def main():
    s = input()
    if not palindrome(s):
        print('No')
        return

    n = len(s)
    s1 = s[:(n-1)//2]
    if not palindrome(s1):
        print('No')
        return

    s2 = s[((n+3)//2)-1:]
    if not palindrome(s2):
        print('No')
        return

    print('Yes')
    


main()

Solution (Python):
def f(q):
    for i in range(len(q)):
        if q[i]!=q[len(q)-1-i]: return 0
    return 1

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

Solution (Python):
if __name__ == '__main__':
    from sys import stdin
    input = stdin.readline

    s = input()[:-1]
    n = len(s)
    for a, b in zip(s, s[::-1]):
        if a != b:
            print('No')
            exit()
    for a, b in zip(s[:(n-1)//2], s[(n-3)//2:0:-1]):
        if a != b:
            print('No')
            exit()
    for a, b in zip(s[(n+1)//2:], s[::-1]):
        if a != b:
            print('No')
            exit()
    print('Yes')

Solution (Python):
s = input()
n = len(s)

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

if ok(s) and ok(s[:n//2]) and ok(s[n//2+1:]):
        print('Yes')
else:
    print('No')

Solution (Python):



import sys
sys.setrecursionlimit(10000000)


dxdy=((1,0),(0,1))

def pin(type=int):
    return map(type,input().rstrip().split())
"""  
def resolve():
    N,M=pin()
    print(N*(N-1)//2+M*(M-1)//2)
""" 
def resolve():
    S=input()
    N=len(S)
    S2=(S[0:(N-1)//2])
    S3=(S[(N+3)//2-1:N])
    print(["No","Yes"][S==S[::-1] and S2==S2[::-1] and S3==S3[::-1]])
"""         


"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """akasaka"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """level"""
        output = """No"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """atcoder"""
        output = """No"""
        self.assertIO(input, output)

if __name__=="__main__":resolve()

Solution (Python):
S = input()
N = len(S)
M = (N-1)//2
U = S[:M]
V = S[M+1:]
if U != V or U != U[::-1]:
    print('No')
else:
    print('Yes')

Solution (Python):

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy





S = input()
l = len(S)

def ok(S):
    for i in range(l):
        if S[i] != S[l - i - 1]:
            return False

    for i in range((l - 1) // 2):
        if S[i] != S[l // 2 - i - 1]:
            return False
        if S[l // 2 + 1 + i] != S[l - i - 1]:
            return False

    return True

print("Yes" if ok(S) else "No")

Solution (Python):
S = input()
lS = len(S)

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

Solution (Python):
s = input()

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

s_reversed = ''.join(list(reversed(s)))
s1_reversed = ''.join(list(reversed(s1)))
s2_reversed = ''.join(list(reversed(s2)))

if s == s_reversed and s1 == s1_reversed and s2 == s2_reversed:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
h=len(s)//2
l,r=s[:h],s[-h:]
print(['No','Yes'][s==s[::-1] and l==l[::-1] and r==r[::-1]])

Solution (Python):
s = input()
s1 = s[:len(s)//2]
s2 = s[len(s)//2+1:]


if s == s[::-1] and s1 == s1[::-1] and s2 == s2[::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
def is_palindrome(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')

Solution (Python):
s = input()
n = len(s)
def f(a):
  return a == a[::-1]

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

Solution (Python):
S = list(input())

flag = True
if S != S[::-1]:
    flag = False

N = len(S)

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

if tmp != tmp[::-1]:
    flag = False

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

if tmp != tmp[::-1]:
    flag = False

if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
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")

Solution (Python):
S=input()
N=len(S)
Sr=''.join([S[-i-1] for i in range(N)])
T=''.join([S[i] for i in range(0,(N-1)//2)])
Tr=''.join([T[-i-1] for i in range(0,(N-1)//2)])
U=''.join([S[i] for i in range((N+1)//2,N)])
Ur=''.join([U[-i-1] for i in range(0,(N-1)//2)])
if S==Sr and Tr==T and U==Ur:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
input = sys.stdin.readline

s = list(input().rstrip())
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")

Solution (Python):

s = input()




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

n = len(s)
if cal(s) and cal(s[:n//2]) and cal(s[n//2+1:n]):
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
n = len(s)
if s != list(reversed(s)):
    print("No")
    exit()
if s[:n//2] != list(reversed(s[:n//2])):
    print("No")
    exit()
if s[(n//2)+1:] != list(reversed(s[(n//2)+1:])):
    print("No")
    exit()
print("Yes")

Solution (Python):
def solve():
    S = input()
    N = len(S)
    l = list(S)
    cond = False
    
    s = list(S[:(N-1)//2])
    t = list(S[(N+3)//2-1:])
    
    if l == list(reversed(l)) and s == list(reversed(s)) and t == list(reversed(t)):
        cond = True
    
    return 'Yes' if cond else 'No'

print(solve())

Solution (Python):
s = str(input())
n = len(s)
for i in range((n-1)//2):
  if s[i] != s[(n-1)//2-i-1]:
    print("No")
    exit()
for i in range((n-1)//2):
  if s[i] != s[i-1+(n+3)//2]:
    print("No")
    exit()
print("Yes")

Solution (Python):
Ss = input()

N = len(Ss)
S1s = Ss[:N//2]
S2s = Ss[N//2+1:]



if Ss == Ss[::-1] and S1s == S1s[::-1] and S2s == S2s[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
n = len(S)

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

if isCyclic(S) and isCyclic(S[:(n - 1) // 2]) and isCyclic(S[(n + 1) // 2:]):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
for i in range(0,(N-1)//2):
    if(S[i] != S[(N-1)//2-i-1]):
        print("No")
        exit()
for i in range(N):
    if(S[i] != S[N-1-i]):
        print("No")
        exit()
for i in range((N+3)//2-1,N):
    if(S[i] != S[N-i-1]):
        print("No")
        exit()
print("Yes")

Solution (Python):

S = input()
N = len(S)

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

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

if A and B and C:
  print('Yes')
else:
  print('No')

Solution (Python):
s = list(input())

a = len(s)
for i in range(0, (a-1)//2):
    if s[i] == s[a-1-i] == s[(a-3)//2 -i] == s[(a+1)//2+i]:
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
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")

Solution (Python):
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')

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

Solution (Python):
def main():
    S = input()
    N = len(S)
    V = S[:(N-1)//2]
    W = S[(N+1)//2:]
    ans = "Yes"
    for i in range(N//2):
        if S[i] != S[N-1-i]:
            ans = "No"
    M = len(V)
    L = len(W)
    for i in range(M//2):
        if V[i] != V[M-1-i]:
            ans = "No"
    for i in range(L//2):
        if W[i] != W[L-1-i]:
            ans = "No"
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

YES = "Yes"  
NO = "No"  

def solve(S: str):
    N = len(S)

    if N == 3:
        if S == S[::-1]:
            print(YES)
            exit()
        else:
            print(NO)
            exit()

    s1 = S[:(N-1)//2]
    s1r = s1[::-1]
    s2 = S[(N+3)//2]
    s2r = s2[::-1]
    
    if S == S[::-1] and s1 == s1r and s2 == s2r:
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if len(s)%2!=1:
    print('No')
else:
    res = False
    n = len(s)
    
    t = s[:(n-1)//2]
    u = s[(n+3)//2-1:]
    
    if s==s[::-1]:
        if t==t[::-1]:
            if u==u[::-1]:
                res = True
    print('Yes' if res else 'No')

Solution (Python):
def judge(s):
    N = len(s)
    if s != s[::-1]:
        return False
    s1 = s[:N // 2]
    if s1 != s1[::-1]:
        return False
    s2 = s[(N + 1) // 2:]
    if s2 != s2[::-1]:
        return False
    return True


S = input()
print('Yes' if judge(S) else 'No')

Solution (Python):
S = input()
T = S[:len(S)//2]
U = S[(1+len(S)//2):]

def kaibun(s):
    for k in range(len(s)//2):
        if s[k] != s[-k-1]:
            return False
    return True
if kaibun(S) == kaibun(U) == kaibun(T) == True:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
N = len(S)
p, q = S[:(N - 1) // 2], S[(N + 3) // 2 - 1:]
print("Yes" if S == S[::-1] and p == p[::-1] and q == q[::-1] else "No")

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


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

Solution (Python):
s = input()
n = len(s)

sub_s = s[: n // 2]

if s == s[::-1] and sub_s == sub_s[::-1]:
  print('Yes')
else:
  print('No')

Solution (Python):
def check(string):
    return string == string[::-1]
S = input()
N = len(S)

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

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

def print_l(l):
    print(' '.join(map(str, l)))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res


S = s_in()
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")

Solution (Python):
S = list(str(input()))

det = 0
N = len(S)

for i in range(N):
    if S[i] != S[N-i-1]:
        det = -1

M = (N-1)//2
for i in range(M):
    if S[i] != S[M-i-1]:
        det = -1

for i in range((N+1)//2,N):
    if S[i] != S[N-(i-(N+1)//2)-1]:
        det = -1

if det == 0:
    print("Yes")
else:
    print("No")

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

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

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

if flag:
  print('Yes')
else:
  print('No')

"""C問題"""


"""D問題"""

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

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

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

Solution (Python):
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:] == S[(N+3)//2 - 1:][::-1]:
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import exit, setrecursionlimit
setrecursionlimit(10**6)

def array2D(row, col ,val=0):
    return [[val]*col for i in range(row)]

s = input()
n = len(s)

t = s[:(n-1)//2]
k = s[(n+3)//2-1:]
if s==s[::-1] and t==t[::-1] and k==k[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
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')

Solution (Python):
s = input()
n = len(s)
flag = True
for i in range(n):
    if s[i] != s[n - i - 1]:
        flag = False

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

for i in range((n + 3) // 2, n):
    if s[i] != s[n - i - 1]:
        flag = False
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
n = len(s)
ans = "Yes"
for i in range(n//2):
    if s[i] != s[-i-1]:
        ans = "No"
for i in range((n-1)//4):
    if s[i] != s[(n-1)//2-1-i]:
        ans = "No"
    if s[i+(n+3)//2-1] != s[n-1-i]:
        ans = "No"
print(ans)

Solution (Python):
def isPalin(x):
    for i in range(len(x)//2):
        if x[i] != x[-(i+1)]:
            return False
    return True

S = input()
N = len(S)

def a():
    if not(isPalin(S)):
        return False
    if not(isPalin(S[:(N-1)//2])):
        return False
    if not(isPalin(S[(N+3)//2-1:])):
        return False
    return True

print(["No","Yes"][a()])

Solution (Python):



from math import *
from copy import *
from string import *				
from random import *				
from bisect import *				
from sys import stdin				
from sys import maxsize
from operator import *				
from itertools import *
from collections import Counter		
from collections import defaultdict 

'''
akasaka
'''

def solve(s):
	n = len(s)
	a = s[:((n-1)//2)]
	b = s[((n+3)//2)-1:]
	
	return 'Yes' if(s == s[::-1] and a == a[::-1] and b == b[::-1]) else 'No'
	

s = input()
ans = solve(s)
print(ans)

Solution (Python):
S = input()
N = len(S)
sub1 = S[:(N - 1) // 2]
sub2 = S[(N + 3) // 2 - 1:]
if S == S[::-1] and sub1 == sub1[::-1] and sub2 == sub2[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)
for i in range(n//2):
    if not s[i] == s[(n-3)//2-i] == s[(n+1)//2+i] == s[-(i+1)]:
        print('No')
        break
else: print('Yes')

Solution (Python):
s = input()
n = len(s)
a = s[:(n-1)//2]
b = s[(n+3)//2-1:]
if a==b and a==a[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)

r, l = s[(n+3)//2 - 1:], s[:(n-1)//2]

print("Yes" if (s == s[::-1]) and (r == r[::1]) and (l == l[::-1]) else "No")

Solution (Python):
S = input()
n = len(S)
a = S[::-1]

ans = "Yes"
if S != a: ans = "No"
elif S[:(n-1)//2] != S[(n+3)//2-1:]: ans = "No"
print(ans)

Solution (Python):
import sys
import itertools
import bisect
from operator import itemgetter
 
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()
def combi(n, r):
  r = min(r, n-r)
  numer = denom = 1
  for i in range(1, r+1):
    numer = numer * (n+1-i) %mod
    denom = denom * i %mod
  return numer * pow(denom, mod-2, mod) %mod

s = S()
N = len(s)//2

if s[:N] == s[N+1:]:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
t = 0
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]:
            t = 1
if t == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


S = input()
N = len(S)

for i in range(N // 2):
    if S[i] == S[N - i - 1]:
        continue
    else:
        print("No")
        sys.exit()

for i in range(N // 4):
    if S[i] == S[(N - 1) // 2 - i - 1]:
        continue
    else:
        print("No")
        sys.exit()
    if S[(N + 1) // 2 + i] == S[N - i - 1]:
        continue
    else:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
S = input()
N = len(S)
if S != S[::-1]:
    print('No')
    exit()

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

X = S[N // 2 + 1:]
if X != X[::-1]:
    print('No')
    exit()

print('Yes')

Solution (Python):
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")

Solution (Python):
s = str(input())
n = len(s)

ans = 'Yes'
if s != s[::-1]:
    ans = 'No'
elif s[:int((n-1)/2)] != s[:int((n-1)/2)][::-1]:
    ans = 'No'
elif s[int(((n+3)/2)-1):] != s[int(((n+3)/2)-1):][::-1]:
    ans = 'No'

print(ans)

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

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    s = list(input())
    n = len(s)
    for i in range(n//2):
        if s[i] != s[-1-i]:
            print('No')
            return
    for i in range(((n-1)//2)//2):
        if s[i] != s[(n-1)//2-1-i]:
            print('No')
            return
    s.reverse()
    for i in range(((n-1)//2)//2):
        if s[i] != s[(n-1)//2-1-i]:
            print('No')
            return
    print('Yes')    
    
if __name__ == "__main__":
    main()

Solution (Python):

S = input().strip()
s = S[:len(S)//2]
print('Yes' if S == S[::-1] and s == s[::-1] else 'No')

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
bl = True
if S != S[::-1]:
    bl = False
N = len(S)
N = (N-1) // 2
if S[:N] != S[:N][::-1]:
    bl = False

print('Yes' if bl else 'No')

Solution (Python):
ng = False	
s = input()
n = len(s)
for i in range(n//2):
	if s[i] != s[n-1-i]:
		ng = True
for i in range(((n-1)//2)//2):
	if s[i] != s[(n-1)//2 - 1 - i]:
		ng = True

if ng:
	print("No")
else:
	print("Yes")

Solution (Python):
s = input() 
n = len(s)

s_l = s[:(n-1)//2]
s_r = s[(n+1)//2:]

if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
  print("Yes")
else:
  print("No")

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

s = input()
n = len(s)

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

Solution (Python):
def judge(s):
    N = len(s)
    if s[::-1] != s:
        return False

    a = s[:(N-1)//2]
    if a[::-1] != a:
        return False

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

    return True


S = input()
print("Yes" if judge(S) else "No")

Solution (Python):
s = input()
n = len(s)
if s==s[::-1]:
    t = s[:n//2]
    p = s[n//2 + 1 :]
    if t==t[::-1] and p==p[::-1]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
import sys

 
def main():
    S = input()
    l = len(S)
    a = S[:(l-1)//2]
    b = S[(l-1)//2+1:]
    
    if S == S[::-1] and a == a[::-1] and b == b[::-1]:
        print("Yes")
    else:
        print("No")
    
if __name__ == "__main__":
    main()

Solution (Python):
import sys
input = sys.stdin.readline
S = list(input())[: -1]
N = len(S)
if S[: : -1] != S:
  print("No")
  exit(0)
if S[: N // 2][: : -1] != S[: N // 2]:
  print("No")
  exit(0)
S.reverse()
if S[: N // 2][: : -1] != S[: N // 2]:
  print("No")
  exit(0)
print("Yes")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    N = len(S)
    head = S[:(N-1)//2]
    tail = S[(N-1)//2+1:]

    reversed_head = head[::-1]
    reversed_tail = tail[::-1]
    reversed_S = S[::-1]
    if head == reversed_head and tail == reversed_tail and reversed_S == S:
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s = list(input())
n = len(s)
m = n // 2

a = [] + s[:m]
b = [] + s[m+1:]

for i in range(m):
    if a[i] != a[m-1-i] or b[i] != b[m-1-i] or a[i] != b[i]:
        print('No')
        exit()

print('Yes')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

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

def solve(S: str):
    N = len(S)
    print(YES if isRotStr(S) and isRotStr(S[0:(N-1)//2]) and isRotStr(S[(N+2)//2:N]) else NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
n = len(s)
t = s[:(n//2)]
print('Yes' if s == s[::-1] and t == t[::-1] else 'No')

Solution (Python):
S = raw_input()
print "Yes" if S==S[::-1] and S[:len(S)/2]==S[:len(S)/2][::-1] else "No"

Solution (Python):


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read




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")

Solution (Python):
import sys
input = sys.stdin.readline

s = input().rstrip()
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")

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


S = input()
N = len(S)

if is_palindrome(S) and is_palindrome(S[0:(N-1)//2]) and is_palindrome(S[(N+3)//2-1:]):
    print("Yes")
else:
    print("No")

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

s = input()
n = len(s)

if s != s[::-1]:
    print('No')
    quit()
if s[:n//2] != s[:n//2][::-1]:
    print('No')
    quit()
if s[n//2+1:] != s[n//2+1:][::-1]:
    print('No')
    quit()
print('Yes')

Solution (Python):
s=input()
nagasa=len(s)
zenhan=(nagasa-1)//2
zen=s[:zenhan]
kou=s[-zenhan:]
if zen==zen[::-1] and kou==kou[::-1] and s==s[::-1]:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
n = len(s)

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