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

    val s1 = s.substring(0, (n - 1) / 2)
    val s2 = s.substring((n + 3) / 2 - 1, n)

    if (s == s.reversed() && s1 == s1.reversed() && s2 == s2.reversed()) {
        println("Yes")
    } else {
        println("No")
    }
}