import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    val s = sc.nextLine()
    val sr = s.reversed()
    val n = s.length

    if(s != sr){
        println("No")
        return
    }
    val s1  =s.substring(0, (n-1)/2)
    if(s1 != s1.reversed()){
        println("No")
        return
    }
    val sr1 = sr.substring(0, (n-1)/2)
    if(sr1 != sr1.reversed()){
        println("No")
        return
    }

    println("Yes")
}