  Program Main

    Implicit None
    Character(Len=3)  :: S

    S = ""
    Read(*,*) S

    If (S == "AAA" .or. S == "BBB") then
       Write(*,"(a)")"No" 
    Else
       Write(*,"(a)")"Yes"
    Endif

  End Program
