let s = stdin.ReadLine () if s.[0..(s.Length-1)/2] = s.[(s.Length-1)/2+1..] then "YES" else "NO" |> printfn "%s"