let s = read_line () in
let n = String.length s in
let rec palindrome a b =
    if a >= b then true else
        if s.[a] = s.[b] then palindrome (a + 1) (b - 1) else false
in
print_endline @@
    if palindrome 0 (n - 1) && palindrome 0 ((n - 3) / 2) && palindrome ((n + 1) / 2) (n - 1) then "Yes" else "No"