import java.util.Scanner
import kotlin.system.exitProcess

fun main(args: Array<String>) {
	val scn = Scanner(System.`in`)
	val s = scn.next()
	val n = s.length
	if ((0 until (n-1)/2).any { s[it] != s[n-1-it] }) no()
	if ((0 until (n-1)/4).any { s[it] != s[(n-3)/2-it] || s[(n+1)/2+it] != s[n-1-it] }) no()
	print("Yes")
}

fun no(){
	print("No")
	exitProcess(0)
}
