function r(str){
var out ="";
  for(i = str.lenght; i > 0 ; i--){
   out += str.charAt(i-1);
  }
return out;
};
 
var n = S.lenght;
if(r(S) == S){
  var b = S.substring(0,(n-1)/2);
  if(r(b) = b){
    var c = S.substring((n+3)/2,n);
    if(r(c) = c){
      console.log("Yes");
    }else{console.log("No");}
  }else{console.log("No");}
}else{console.log("No");}