"use strict";
function main(input) {
  const s = input[0];
  const n = s.length;

  let judge = false;
  if(s === s.split("").reverse().join("")){
    let a = s.substr( 0, (n-1)/2);
    //console.log(a)
    if(a === a.split("").reverse().join("")){
      let b = s.substr( (n+3)/2 -1, n-1);
      //console.log(b)
      if(b === b.split("").reverse().join("")){
        judge = true;
      }
    }
  }

  console.log(judge?"Yes":"No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));