fun main(args: Array<String>) {
    val s = readLine()!!
    val n = s.length
    var a = "No"
    if (n == 3 && s == s.reversed()) {
        a = "Yes"
    } else {
        val prefix = s.substring(0, (n - 1) / 2)
        val suffix = s.substring((n + 3) / 2 - 1)
        if (s == s.reversed() && prefix == prefix.reversed() && suffix == suffix.reversed()) {
            a = "Yes"
        }
    }
    println(a)
}