import Prelude hiding (Right, Left)
import Data.List

data Dist = Up | Left | Down | Right

main = do
    s <- map (\x->(head x, length x)) . group <$> getLine
    [x,y] <- map read . words <$> getLine :: IO [Int]
    putStrLn $ if dfs Right s (0,0) (x,y) then "Yes" else "No"

dfs r xs (x,y) (gx,gy)
    | null xs   = x==gx && y==gy
    | otherwise = if fst (head xs) == 'F' 
        then dfs r (tail xs) (move r (snd $ head xs) (x,y)) (gx,gy)
        else or . map (\nr -> dfs nr (tail xs) (x,y) (gx,gy)) $ turn r (snd $ head xs)
    where
    move r n (x,y) = case r of 
        Up    -> (x  , y+n)
        Left  -> (x-n, y  )
        Down  -> (x  , y-n)
        Right -> (x+n, y  )
    turn r n = case (r, mod n 2 == 0) of
        (Up   , False) -> [Left, Right]
        (Left , False) -> [Up  , Down ]
        (Down , False) -> [Left, Right]
        (Right, False) -> [Up  , Down ]
        (Up   , True ) -> [Up  , Down ] 
        (Left , True ) -> [Left, Right]
        (Down , True ) -> [Up  , Down ]
        (Right, True ) -> [Left, Right]