{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Data.Array.Unboxed
import qualified Data.ByteString.Char8 as BC
import           Data.List             (foldl')
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  s <- getLine
  [x, y] <- readInts
  putStrLn . showResult $ solve s x y

readInts :: IO [Int]
readInts = map (fst . fromJust . BC.readInt) . BC.words <$> BC.getLine

showResult True  = "Yes"
showResult False = "No"

solve :: String -> Int -> Int -> Bool
solve s x y = check dxs x && check (0:dys) y where
  (dxs, dys) = divide2 . map length $ splitOnT s

divide2 xs = (evens, odds) where
  xis   = xs `zip` [0 .. ]
  evens = [x | (x, i) <- xis, i `mod` 2 == 0]
  odds  = [x | (x, i) <- xis, i `mod` 2 == 1]

splitOnT :: String -> [String]
splitOnT = reverse . go [] [] where
  go acc1 acc2 []       = acc2 : acc1
  go acc1 acc2 ('T':xs) = go (acc2 : acc1) [] xs
  go acc1 acc2 (x:xs)   = go acc1 (x : acc2) xs

check :: [Int] -> Int -> Bool
check [] x = x == 0
check (d:ds) x = dp ! x where
  dp = foldl' folder dp0 ds
  dp0 = array (-s, s) $ (d, True) : [(i, False) | i <- [-s .. s], i /= d] :: UArray Int Bool

folder :: UArray Int Bool -> Int -> UArray Int Bool
folder bs d = array (-s, s) [(i, bs `at` (i - d) || bs `at` (i + d)) | i <- [-s .. s]]

s = 8001

at :: UArray Int Bool -> Int -> Bool
at bs i
  | i < -s = False
  | i > s  = False
  | otherwise = bs ! i
