open Printf
open Scanf

let () =
  let ss = scanf "%s " (fun x -> x) in
  let ln = String.length ss in
  let rec iter i =
    if i = ln - 1 then "No"
    else if String.sub ss i 2 = "AC" then "Yes"
    else iter (i + 1) in
  iter 0 |> printf "%s\n"
