object Main extends App {
    println("hello")
    val lines = io.Source.fromInputStream(System.in).getLines()
    val s = lines.next()

    if (isStrongPalindrome(s)) {
        println("Yes")
    } else {
        println("No")
    }

    def isStrongPalindrome(s: String): Boolean = {
        def isPalindrome(s: String): Boolean = s.reverse == s
        val isPalindromeEntirely = isPalindrome(s)

        val n = s.length()
        val isPalindromeFirstHalf = isPalindrome(s.substring(0, (n - 1) / 2))
        val isPalindromeLatterHalf = isPalindrome(s.substring((n + 3) / 2 - 1))
        isPalindromeEntirely && isPalindromeFirstHalf && isPalindromeLatterHalf
    }
}
