import Control.Applicative
import Control.Monad
import Data.List
strToInt s = (read :: String -> Int) s

main :: IO ()
main = do
    -- 文字列の入力
    s <- getLine
    [gx, gy] <- map strToInt . words <$> getLine
    -- 出力
    putStrLn $ solve (init s) (0, 0) (gx, gy)

solve :: String -> (Int, Int) -> (Int, Int) -> String
solve [] (x', y') (x, y) = if x == x' && y == y' then "Yes" else "No"
solve (s:ss) (x', y') (x, y) = case s of
    'T' -> if y' < y then solve ss (y', x') (y, x) else solve ss (y, x') (y', x)
    'F' -> solve ss (x'+1, y') (x, y)
