main = do s <- getLine let l = length s `div` 2 putStrLn $ if take l s == drop l s then "YES" else "NO"