fun main(args: Array<String>) {
    var s= readLine()!!
    var l=s.length
    var lm=(l+1)/2
    var ll=(lm+1)/2
    var ls=Array(ll){' '}.toMutableList()
    var f=true
    for(i in 0 until ll){
        ls[i]=s[i]
        if(ls[i]!=s[l-1-i]){
            f=false
        }
        if(ls[i]!=s[lm-2-i]){
            f=false
        }
        if(ls[i]!=s[lm+i]){
            f=false
        }
    }
    if(f){
        println("Yes")
    }else{
        println("No")
    }

}