object Main extends App {
  val s = io.StdIn.readLine
  if (s == s.reverse
      && s.substring(0, (s.length - 1) / 2) == s
        .substring(0, (s.length - 1) / 2)
        .reverse
      && s.substring((s.length + 2) / 2) == s
        .substring((s.length + 2) / 2)
        .reverse) println("Yes")
  else println("No")
}
