import scala.io.StdIn

object Main extends App {
  val s: String = StdIn.readLine()
  val n = s.length

  val a: Boolean = s == s.reverse
  val b: Boolean = s.slice(0, (n-1)/2) == s.slice(0, (n-1)/2).reverse
  val c: Boolean = s.slice((n+3)/2-1, n) ==  s.slice((n+3)/2-1, n).reverse
  println(if(a&&b&&c) "Yes" else "No")
}