import java.util.*

fun isPalindrome(s: String): Boolean {
  val n = s.length
  for (i in 0 until n / 2) {
    if (s[i] != s[n - i - 1]) return false
  }
  return true
}

fun main(args: Array<String>) {
  val s = readLine()!!
  val n = s.length
  val a = s.substring(0, (n - 1) / 2)
  val b = s.substring((n + 3) / 2 - 1, n)
  if (a == b && isPalindrome(a) && isPalindrome(b)) {
    println("Yes")
  } else {
    println("No")
  }
}
