import re

n = eval(input())

if re.search("AC", n):

    print("Yes")

else:

    print("No")

n = eval(input())

if "AC" in n:

    print("Yes")

else:

    print("No")

import re

n = eval(input())
if re.search("AC", n):
    print("Yes")
else:
    print("No")

n = eval(input())
if "AC" in n:
    print("Yes")
else:
    print("No")

-import re - -if re.search("AC", n): +if "AC" in n: