
object Main extends App {
  def is_yes(str: String): Boolean = {
    val len = str.length
    return len == 1 || (str.head == str.last && is_yes(str.slice(1, len - 1)))
  }
  val sc = new java.util.Scanner(System.in)
  val s = sc.next
  val n = s.length

  val no_num = Array(s, s.slice(0, (n - 1) / 2), s.substring((n + 3) / 2 - 1))
    .filter(!is_yes(_))
    .length


  println(if (no_num > 0) "No" else "Yes")
}
