read S
N=${#S}
(
diff -s <(echo $S) <(rev <<<$S) &&
diff -s <(echo ${S::(N-1)/2}) <(rev <<<${S::(N-1)/2}) &&
diff -s <(echo ${S:((N+3)/2)-1}) <(rev <<<${S:((N+3)/2)-1}) 
) >/dev/null&&
echo Yes||echo No