import sys

input = sys.stdin.readline

#input = sys.stdin.buffer.readline



#sys.setrecursionlimit(10**9)



def RD(): return sys.stdin.read()

def II(): return int(eval(input()))

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

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

def TI(): return tuple(map(int,input().split()))

# rstrip().decode('utf-8')

#import numpy as np



from collections import deque



def main():

	s=input().rstrip()

	ans="Yes"

	n=len(s)

	for i in range(n):

		if s[i]!=s[-i-1]:

			ans="No"

	for i in range(n//2):

		if s[i]!=s[n//2-i-1]:

			ans="No"

	print(ans)











if __name__ == "__main__":

	main()
import sys

#input = sys.stdin.buffer.readline





#sys.setrecursionlimit(10**9)

#from functools import lru_cache



def RD(): return sys.stdin.read()

def II(): return int(eval(input()))

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

def MF(): return list(map(float,input().split()))

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

def LF(): return list(map(float,input().split()))

def TI(): return tuple(map(int,input().split()))

# rstrip().decode()



#import numpy as np



def main():

	s=eval(input())

	n=len(s)

	ans="Yes"



	if s!=s[::-1] or s[:(n-1)//2]!=s[:(n-1)//2][::-1] or s[(n+3)//2-1:]!=s[(n+3)//2-1:][::-1]:

		ans="No"



	print(ans)



if __name__ == "__main__":

	main()

import sys

input = sys.stdin.readline
# input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**9)
def RD():
    return sys.stdin.read()


def II():
    return int(eval(input()))


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


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


def TI():
    return tuple(map(int, input().split()))


# rstrip().decode('utf-8')
# import numpy as np
from collections import deque


def main():
    s = input().rstrip()
    ans = "Yes"
    n = len(s)
    for i in range(n):
        if s[i] != s[-i - 1]:
            ans = "No"
    for i in range(n // 2):
        if s[i] != s[n // 2 - i - 1]:
            ans = "No"
    print(ans)


if __name__ == "__main__":
    main()

import sys

# input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**9)
# from functools import lru_cache
def RD():
    return sys.stdin.read()


def II():
    return int(eval(input()))


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


def MF():
    return list(map(float, input().split()))


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


def LF():
    return list(map(float, input().split()))


def TI():
    return tuple(map(int, input().split()))


# rstrip().decode()
# import numpy as np
def main():
    s = eval(input())
    n = len(s)
    ans = "Yes"
    if (
        s != s[::-1]
        or s[: (n - 1) // 2] != s[: (n - 1) // 2][::-1]
        or s[(n + 3) // 2 - 1 :] != s[(n + 3) // 2 - 1 :][::-1]
    ):
        ans = "No"
    print(ans)


if __name__ == "__main__":
    main()

-input = sys.stdin.readline +# from functools import lru_cache +def MF(): +    return list(map(float, input().split())) + + + + +def LF(): +    return list(map(float, input().split())) -# rstrip().decode('utf-8') +# rstrip().decode() -from collections import deque - - -    s = input().rstrip() +    s = eval(input()) +    n = len(s) -    n = len(s) -    for i in range(n): -        if s[i] != s[-i - 1]: -            ans = "No" -    for i in range(n // 2): -        if s[i] != s[n // 2 - i - 1]: -            ans = "No" +    if ( +        s != s[::-1] +        or s[: (n - 1) // 2] != s[: (n - 1) // 2][::-1] +        or s[(n + 3) // 2 - 1 :] != s[(n + 3) // 2 - 1 :][::-1] +    ): +        ans = "No"