{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Text as T
import qualified Data.Text.IO as TIO

main :: IO ()
main = do
  str <- TIO.getLine
  let length = T.length str
      strBef = T.take ((length-1)`div`2) str
      strAft = T.drop ((length+1)`div`2) str
  if all (==True) [isPalindrome str, isPalindrome strBef, isPalindrome strAft]
    then TIO.putStrLn "Yes"
    else TIO.putStrLn "No"
isPalindrome :: T.Text -> Bool
isPalindrome text = text == (T.reverse text)
