{-# LANGUAGE OverloadedStrings #-}
import Data.Char
import Data.List
import Control.Monad
import qualified Data.ByteString.Char8 as BS

main :: IO ()
main = do
  s <- BS.getLine
  BS.putStrLn $ if 'A' `BS.elem` s && 'B' `BS.elem` s then "Yes" else "No"
  where
     parseLine = unfoldr (BS.readInt . BS.dropWhile isSpace)