fun main(args : Array<String>) {
    val s = readLine()!!

    if (s != s.reversed()) {
        println("No")
        return
    }

    var idx = (s.length-1)/2
    var subS = s.take(idx)

    if (subS != subS.reversed()) {
        println("No")
        return
    }

    idx = (s.length+3)/2
    subS = s.takeLast(s.length-(idx-1))

    if (subS != subS.reversed()) {
        println("No")
        return
    }

    println("Yes")
}
