fun main (args:Array<String>) {
    val a = readLine()!!
    if (a!=a.reversed()){
        println("No")
        return
    }
    val b=a.substring(0,(a.length-1)/2)
    if (b != b.reversed()) {
        println("No")
        return
    }

    val c = a.substring(((a.length + 3) / 2) - 1, a.length)
    if (c != c.reversed()) {
        println("No")
        return
    }
    println("Yes")
}