
solver::String->Bool
solver [] = False
solver (_:[])= False
solver (x:y:xs) = if (x,y)==('A','C') then True else solver (y:xs)

main::IO()
main= do
  str<-getLine
  putStr (if solver str then "Yes\n" else "No\n")