fun main(args: Array<String>) {
    val s = readLine()!!.toCharArray()
    val len = s.count()
    var count = 0
    for(i in 1..((len/2).toInt() + len%2)){
        if(s[i-1] != s[len - i]) count++ 
    }
    for(i in 1..(((len-1)/4).toInt() + ((len-1)/2)%2)){
        if(s[i-1] != s[(len - 1)/2 - i]) count++
    }
    for(i in (len + 3)/2..(len/2) + len%2){
        if(s[i-1] != s[len + (len + 3)/2 - i - 1]) count++
    }
    if(count == 0) println("Yes")
    else println("No")
}