let array_of_string s = Array.init (String.length s) (fun i -> s.[i])

let () =
  read_line ()
  |> array_of_string
  |> Array.to_list
  |> (fun (h :: t) ->
      List.fold_left (fun (b, prev) c -> (b || prev = 'A' && c = 'C', c)) (false, h) t)
  |> fst
  |> (function true -> "Yes" | false -> "No")
  |> print_endline