program example
	implicit none

	character(1) S(3)
    integer :: i,a=0,b=0
    
    do i=1,3
    	read(*,"(a1)",advance="no") S(i)
    end do
    
    do i=1,3
    	if(S(i)=="A") then
        	a=a+1
        else if (S(i)=="B") then
        	b=b+1
        end if
    end do
    
    if(a==3 .or. b==3) then
    	write(*,*) "No"
    else
    	write(*,*) "Yes"
    end if
    	

end program example