"use strict";

const main = arg => {

    const input = arg.trim()
    const rev_input = input.split('').reverse().join('')

    const N = (input.length - 1) / 2

    const front_ss = input.substr(0, N);
    const rev_front_ss = front_ss.split('').reverse().join('')

    const back_ss = input.substr(N + 1, N);
    const rev_back_ss = back_ss.split('').reverse().join('')

    if (input == rev_input && front_ss == rev_front_ss && back_ss == rev_back_ss) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));