import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val s = sc.nextLine

  def judge(s: String) = {
    val splitPos = s.length / 2

    s.take(splitPos) == s.substring(splitPos + 1).reverse
  }

  val n = s.length
  println(
    if (judge(s) && judge(s.take((n - 1) / 2)) && judge(s.substring((n + 3) / 2 - 1))) "Yes"
    else "No"
  )
}
