program main
      character(3) :: s
      integer(4) :: i

      read(*,*) s
      if ( s(1:1) == s(2:2) ) then

        if ( s(2:2) == s(3:3) ) then
          print *, 'No'
        else
          print *, 'Yes'
        end if
      else
        print *, 'Yes'
      end if

end program main
