import scala.io.StdIn._

object Main extends App {
  private def isPalindrome(s: String) = {
    Range(0, s.length / 2).forall { i =>
      s.charAt(i) == s.charAt(s.length - i - 1)
    }
  }

  val s = readLine.stripMargin
  val n = s.length

  val ans = isPalindrome(s) &&
    isPalindrome(s.substring(0, (n - 1) / 2)) &&
    isPalindrome(s.substring((n + 3) / 2 - 1, n))

  println(if (ans) "Yes" else "No")
}

