fun main(args: Array<String>) {
    val S = readLine()!!
    val N = S.length
    val S1 = S.take((N - 1) / 2)
    val S2 = S.takeLast((N - 1) / 2)
    println(if (S == S.reversed() && S1 == S1.reversed() && S2 == S2.reversed()) "Yes" else "No")
}