object Main extends App{
  import scala.io.StdIn._
  val s=readLine().toString
  var flag:Boolean=true
  val leng=s.length
  val a=s.take((leng-1)/2)
  val b=s.takeRight((leng-1)/2)
  if(s==s.reverse&&a==a.reverse&&b==b.reverse){
    println("Yes")
  }else{
    println("No")
  }
}