fun main(args: Array<String>) {
    val s = readLine() ?: return
    fun isPalindrome(value: String): Boolean {
        var i = 0
        var j = value.length - 1
        while (i <= j) {
            if (value[i] != value[j]) {
                return false
            }
            i++
            j--
        }
        return true
    }

    val n = s.length
    val s1 = s.substring(0, (n - 1) / 2)
    val s2 = s.substring((n + 3) / 2 - 1, n)

    System.err.println(s1)
    System.err.println(s2)

    if (isPalindrome(s) && isPalindrome(s1) && isPalindrome(s2)) {
        println("Yes")
    } else {
        println("No")
    }
}
