let list_of_string s =
  let n = String.length s in
  let rec aux acc i =
    if i >= n then List.rev acc else aux (s.[i] :: acc) (i + 1)
  in
  aux [] 0

let () =
  let s = read_line () in
  let n = String.length s in
  let p = (n - 1) / 2 and q = (n + 3) / 2 in
  let ls_u = list_of_string s
  and ls_p = list_of_string (String.sub s 0 p)
  and ls_q = list_of_string (String.sub s (q - 1) (n - q + 1)) in
  if ls_u = List.rev ls_u && ls_p = List.rev ls_p && ls_q = List.rev ls_q then
    print_endline "Yes"
  else print_endline "No"
