module Main where

import           Debug.Trace
import qualified Data.Vector.Unboxed           as VU
import           Data.List
import qualified Data.ByteString               as BS
import qualified Data.ByteString.Char8         as BSC8
import           Data.Char
import           Data.Maybe


getVUIntFromInputLineAtBSC8 :: IO (VU.Vector Int)
getVUIntFromInputLineAtBSC8 =
    VU.unfoldr (BSC8.readInt . BSC8.dropWhile isSpace) <$> BSC8.getLine
getListIntFromInputLineAtBSC8 =
    unfoldr (BSC8.readInt . BSC8.dropWhile isSpace) <$> BSC8.getLine
readInt = fst . fromJust . BSC8.readInt
readIntList = map readInt . BSC8.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main :: IO ()
main = do
    s <- getLine
    --[aM,aN] <- getListIntFromInputLineAtBSC8
    --aP                   <- getVUIntFromInputLineAtBSC8
    --aQ                   <- getVUIntFromInputLineAtBSC8
    --aR                   <- getVUIntFromInputLineAtBSC8

    --vP <- VU.fromList . take aX . reverse . sort <$> getIntList
    --vQ <- VU.fromList . take aY . reverse . sort <$> getIntList
    --vR <- VU.fromList . take (aX + aY) . reverse . sort <$> getIntList
    putStrLn $ if isStrongPalindrome s then "Yes" else "No"


isStrongPalindrome :: [Char] -> Bool
isStrongPalindrome s =
    (isPalindrome (take lFront s)) && (isPalindrome (drop lBack s))
  where
    isEven = if (mod (length s) 2) == 0 then True else False
    lFront = div (length s) 2 - if isEven then 1 else 0
    lBack  = div (length s) 2 + if isEven then 0 else 1

isPalindrome :: [Char] -> Bool
isPalindrome [] = True
isPalindrome (x:[]) = True
isPalindrome s =
    if (head s == last s) then isPalindrome $ tail $ init s else False
