fun main(args: Array<String>) {
    val s = readLine()!!
    val n = s.length
    val left = s.substring(0 until (n/2))
    val right = s.substring(n/2+1)
    if (check(s) && check(left) && check(right)) {
        println("Yes")
    } else {
        println("No")
    }
}

fun check(value: String): Boolean {
    return value == value.reversed()
}
