fun main(args: Array<String>) {
    solve(java.util.Scanner(System.`in`))
}

fun check(str: String, s: Int, e: Int): Boolean {
    var ss = s
    var ee = e - 1
    while (ss < ee) {
        if (str[ss] != str[ee]) {
            return false
        }
        ss++
        ee--
    }
    return true
}

fun solve(sc: java.util.Scanner) {
    val S = sc.next()
    val N = S.length

    if (check(S, 0, N) &&
        check(S, 0, (N - 1) / 2) &&
        check(S, (N + 3) / 2 - 1, N)
    ) {
        println("Yes")
    } else println("No")
}
