fun main(args: Array<String>) {
    val s = readString()
    if (
        s.isPalindrome() &&
        s.substring(0 until (s.length - 1) / 2).isPalindrome() &&
        s.substring((s.length + 3) / 2 - 1 until s.length).isPalindrome()
    ) {
        println("Yes")
    } else {
        println("No")
    }
}

fun String.isPalindrome(): Boolean {
    return if (this.length % 2 == 0) {
        val x = this.substring(0 until this.length / 2)
        val y = this.substring(this.length / 2 until this.length).reversed()
        x == y
    } else {
        val x = this.substring(0 until (this.length - 1) / 2)
        val y = this.substring((this.length + 3) / 2 - 1 until this.length).reversed()
        x == y
    }
}

// Tools
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)