const { count } = require("console");

function main(lines) {
  const S = s();

  let ans = true;
  for (let i = 0, end = S.length-1; i < end/4; i++) {
    if ( S[i] != S[end-i]
      || S[i] != S[end/2-1-i]
      || S[i] != S[end/2+1+i]
    ) {
      ans = false;
      break;
    }
  }
  
  return ans ? 'Yes' : 'No';
}



const lines = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");

let lineCount = 0;
const s = () => lines[lineCount++];
const n = () => Number(s());
const b = () => BigInt(s());
const sa = () => s().split(' ');
const na = () => sa().map(Number);
const ba = () => sa().map(BigInt);

const ans = main(lines);
console.log( ans );