unittest
{
	assert( [ "BACD" ].parse.expand.solve == "Yes" );
	assert( [ "ABCD" ].parse.expand.solve == "No" );
	assert( [ "CABD" ].parse.expand.solve == "No" );
	assert( [ "ACACA" ].parse.expand.solve == "Yes" );
	assert( [ "XX" ].parse.expand.solve == "No" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto s = input.front.to!( dchar[] );
	return tuple( s );
}

auto solve( dchar[] s )
{
	for( auto i = 0L; i + 1 < s.length; i++ )
	{
		if( s[ i .. i + 2 ] == "AC" ) return "Yes";
	}
	return "No";
}
