main :: IO ()
main = do
  s <- getLine
  let isPa = s == reverse s
  let s2 = take ((length s - 1) `div` 2)  s
  let isPb = s2 == reverse s2
  let s3 = drop (((length s + 3) `div` 2) - 1) s
  let isPc = s3 == reverse s3
  putStrLn $ if isPa && isPb && isPc then "Yes" else "No"
