program sample
	character(len=5) :: a
    
    read(*,*) a
    
    if (a(1:2)=='AC' .or. a(2:3)=='AC' .or. a(3:4)=='AC' .or. a(4:5)=='AC') then
    	write(*,*) 'Yes'
    else
    	write(*,*) 'No'
    end if
    stop
end program sample
