fun main(args: Array<String>) {

    fun isPalindrome(s: String): Boolean {
        return if (s.length % 2 == 1) {
            val mae = s.substring(0 until s.length / 2)
            val usiro = s.substring(s.length / 2 + 1 until s.length)
            return mae == usiro.reversed()
        } else {
            val mae = s.substring(0 until s.length / 2)
            val usiro = s.substring(s.length / 2 until s.length)
            return mae == usiro.reversed()
        }
    }

    val str = readLine()!!

    if (!isPalindrome(str)) {
        println("No")
        return
    }

    if (!isPalindrome(str.substring(0 until (str.length - 1) / 2))) {
        println("No")
        return
    }

    if (!isPalindrome(str.substring(((str.length + 3) / 2) - 1 until str.length))) {
        println("No")
        return
    }

    println("Yes")
}



