main = do e<-getLine let a=length(e) `div` 2 putStrLn $ if (take a e)==(drop a e) then "YES" else "NO"