fun main(args: Array<String>) {
    val n = readLine()!!.split(" ")
    val nlength = n[0].length
    var f = 0
    val b = (nlength - 1) / 4 - 1
    val a = (nlength - 1) / 2 - 1
    val l = n[0].toCharArray()
    for (i in 0..a) {
        var m = nlength - 1 - i
        if (l[i] != l[m]) {
            f = 1
        }
    }
    for (i in 0..b){
        var ll = (nlength - 1) / 2 - i - 1
        var lll = (nlength + 3) / 2 + i - 1
        var m = nlength - 1 - i
        if (l[i] != l[ll]){
            f = 1
        } else if (l[lll] != l[m]){
            f = 1
        }
    }
    if (f == 1){
        println("No")
    } else {
        println("Yes")
    }
}