Scanf.scanf "%s" (fun s ->
  let rec f s n i =
    if i >= n / 2 then true
    else if s.[i] <> s.[n-1-i] then false
    else f s n (i+1)
  and n = String.length s in
  print_endline (if f s n 0 && f s ((n-1) / 2) 0 then "Yes" else "No"))