unittest
{
	assert( [ "akasaka" ].parse.expand.solve == "Yes" );
	assert( [ "level" ].parse.expand.solve == "No" );
	assert( [ "atcoder" ].parse.expand.solve == "No" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto s = input.front.to!( dchar[] );
	return tuple( s );
}

auto solve( dchar[] s )
{
	auto ba = 0L;
	auto na = s.length.signed;
	foreach( i; ba .. ba + na / 2 )
	{
		if( s[ i ] != s[ ba + na - 1 - i ] ) return "No";
	}
	auto bb = 0L;
	auto nb = ( s.length.signed - 1 ) / 2;
	foreach( i; bb .. bb + nb / 2 )
	{
		if( s[ i ] != s[ bb + nb - 1 - i ] ) return "No";
	}
	auto bc = ( s.length.signed + 3 ) / 2 - 1;
	auto nc = s.length.signed - bc;
	foreach( i; bc .. bc + nc / 2 )
	{
		if( s[ i ] != s[ bc + nc - 1 - i ] ) return "No";
	}
	return "Yes";
}
