checkKaibun :: String -> Bool
checkKaibun [x] = True
checkKaibun [x, y] = x == y
checkKaibun (x:y:xs) = (x == last xs) && checkKaibun (y : init xs)

firstPart n = take ((n - 1) `div` 2)
lastPart n = drop (((n + 3) `div` 2) - 1)

solve x = checkKaibun x && (checkKaibun $ firstPart len x) && (checkKaibun $ lastPart len x)
            where 
              len = length x
main = do 
  s <- getLine
  putStrLn $ if solve s then "Yes" else "No"