import qualified Data.Set as S
 
type Dir = Int
type Pos = (Int, Int)
type State = (Dir, Pos)
 
main :: IO ()
main = do
  s <- getLine
  [x, y] <- map read . words <$> getLine
  putStr $ solve (x, y) s
 
solve :: Pos -> String -> String
solve z s = judge z . mkSet (0, z) s
 
judge :: Pos -> S.Set State -> String
judge z set
  | (_, z) `S.member` set = "Yes"
  | otherwise= "No"
 
mkSet :: State -> String -> S.Set State
mkSet sta [] = S.empty
mkSet sta (x:xs) =  bind (mkSet sta xs)  (run x)
 
bind :: S.Set State -> (State -> S.Set State) -> S.Set State
bind s f = concat $ map f s
 
run :: Char -> State -> S.Set State
run 'F' (0, (x, y)) = S.singleton (0, (x + 1, y))
run 'F' (1, (x, y)) = S.singleton (1, (x, y + 1))
run 'F' (2, (x, y)) = S.singleton (2, (x - 1, y))
run 'F' (3, (x, y)) = S.singleton (3, (x, y - 1))
run 'T' (0, z) = S.fromList [(3, z), (1, z)]
run 'T' (1, z) = S.fromList [(0, z), (2, z)]
run 'T' (2, z) = S.fromList [(1, z), (3, z)]
run 'T' (3, z) = S.fromList [(2, z), (0 z)]