const main = (inputs) => {
  var array = inputs[0];
  var array2 = '';
  var flag = true;
  if (array.length % 2 === 0) {
    console.log('No');
    return false;
  } else if (array.length <= 5) {
    for (var i = 0; i < Math.floor(array.length / 2); i++) {
      var backWord = array[array.length - 1 - i];
      if (array[i] !== backWord) {
        console.log('No');
        return false;
      }
    }
    console.log('Yes');
    return true;
  }
  for (var i = 0; i < Math.floor(array.length / 2); i++) {
    var backWord = array[array.length - 1 - i];
    if (array[i] !== backWord) {
      flag = false;
      break;
    }
    array2 = array2 + array[i];
  }
  for (var i = 0; i < Math.floor(array2.length / 2); i++) {
    var backWord = array2[array2.length - 1 - i];
    if (array2[i] !== backWord) {
      flag = false;
      break;
    }
  }

  if (flag) {
    console.log('Yes');
  } else {
    console.log('No');
  }

}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));