main = do
    s <- getLine
    let len = length s
    let s1 = take ((len-1)`div`2) s
    let s2 = drop (((len+3)`div`2)-1) s
    if s == reverse s && s1 == reverse s1 && s2 == reverse s2
        then putStrLn "Yes"
        else putStrLn "No"