import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv, std.math,
    std.functional, std.numeric, std.range, std.stdio, std.string, std.random,
    std.typecons, std.container, std.format;

// dfmt off
T lread(T = long)(){return readln.chomp.to!T();}
T[] aryread(T = long)(){return readln.split.to!(T[])();}
void scan(TList...)(ref TList Args){auto line = readln.split();
foreach (i, T; TList){T val = line[i].to!(T);Args[i] = val;}}
alias sread = () => readln.chomp();enum MOD = 10 ^^ 9 + 7;
alias PQueue = BinaryHeap!(Array!long, "a<b");
// dfmt on

void main()
{
    auto S = sread();
    writeln(check(S) && check(S[0 .. (S.length - 1) / 2])
            && check(S[(S.length + 3) / 2 - 1 .. $]) ? "Yes" : "No");
}

bool check(string s)
{
    // writeln(s);
    foreach (i; 0 .. s.length)
    {
        if (s.length - 1 - i < i)
            return true;
        if (s[i] != s[$ - 1 - i])
            return false;
    }
    return true;
}
