fun main() {
    val S = readLine()!!
    val S_start = S.substring(0, (S.count() - 1) / 2).toList()
    val S_end = S.substring((S.count() + 1) / 2).toList()
    val S_start_rev = S_start.reversed()
    val S_end_rev = S_end.reversed()

    if (S_start == S_end && S_end == S_end_rev) {
        println("Yes")
    } else {
        println("No")
    }
}
