#include <bits/stdc++.h>		//万能头文件 
using namespace std;

int main()
{
	string a;
	int pos=0;		//记录位置 
	cin>>a;
	a=a+"D";		//为防止最后一个字母是"A",添加一个不是"C"的字母 
	while(1)
	{
		pos=a.find("A",pos);		//find()函数查找位置 
		if(pos<0)		//如果没找到，返回-1 
		{
			cout<<"No"<<endl;		//endl养成好习惯 
			break;		//跳出循环 
		}
		if(a[pos+1]=='C')		//判断"A"下一个是不是"C"
		{
			cout<<"Yes"<<endl;
			break;		//跳出循环
		}
		pos++;		//下一次从pos+1找起 
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(long long i = 0;i < n;i++)
#define repr(i, n) for(int i = n;i >= 0;i--)
#define For(i, s, e) for(int i = s;i <= e;i++)
#define Sort(v, n) sort(v, v+n);
#define VSort(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define cY cout<<"Yes";
#define cN cout<<"No";
#define cA(a) cout<<a;
const ll MOD = 1000000007;



int main() {
    string s;
    cin >> s;
    bool a=0,ac=0;
    rep(i,s.size()-1) {
        if(s[i] == 'A' && s[i+1] == 'C') ac = 1; 
    }
    if(ac) cout << "Yes";
    else cout << "No";
}
