import Data.List
import Data.Array.IO
import Control.Monad

size = 8000

main = do
  s <- getLine
  (x:y:_) <- map (read :: String -> Int) . words <$> getLine
  memoX <- newArray ((-1, (-size)), (size, size)) False :: IO (IOUArray (Int, Int) Bool)
  memoY <- newArray ((-1, (-size)), (size, size)) False :: IO (IOUArray (Int, Int) Bool)
  let inst = reverse $ decode 'F' s []
      (xI:yI:_) = map reverse $ split 0 inst [[], []]
  dpX memoX 0 xI
  dpY memoY 0 yI
  writeArray memoX (-1, 0) True
  writeArray memoY (-1, 0) True
  resultX <- readArray memoX ((length xI) - 1, x)
  resultY <- readArray memoY ((length yI) - 1, y)
  if resultX && resultY then putStrLn "Yes"
                        else putStrLn "No"

decode :: Char -> String -> [Int] -> [Int]
decode _ [] n = n
decode _ (x:xs) []
  | x == 'F'  = decode x xs [1]
  | otherwise = decode x xs [0]
decode c (x:xs) (n:ns)
  | x == 'F' && c == 'F' = decode x xs (n+1:ns)
  | x == 'F' && c == 'T' = decode x xs (1:n:ns)
  | otherwise            = decode x xs (0:n:ns)

split :: Int -> [Int] -> [[Int]] -> [[Int]]
split _ [] s  = s
split 0 (i:is) (x:xs)
  | i == 0    = split 1 is (x:xs)
  | otherwise = split 0 is ((i:x):xs)
split 1 (i:is) (x:y:ys)
  | i == 0    = split 0 is (x:y:ys)
  | otherwise = split 1 is (x:(i:y):ys)

dpX :: IOUArray (Int, Int) Bool -> Int -> [Int] -> IO (IOUArray (Int, Int) Bool)
dpX memo _ []     = return memo
dpX memo 0 (d:ds) = do
  writeArray memo (0, d) True
  dpX memo 1 ds >>= return
dpX memo n (d:ds) = do
  memo' <- foldM (memoize n d) memo [(-size)..size]
  dpX memo' (n+1) ds >>= return

dpY :: IOUArray (Int, Int) Bool -> Int -> [Int] -> IO (IOUArray (Int, Int) Bool)
dpY memo _ []     = return memo
dpY memo 0 (d:ds) = do
  writeArray memo (0, d) True
  writeArray memo (0, (-d)) True
  dpY memo 1 ds >>= return
dpY memo n (d:ds) = do
  memo' <- foldM (memoize n d) memo [(-size)..size]
  dpY memo' (n+1) ds >>= return

memoize :: Int -> Int -> IOUArray (Int, Int) Bool -> Int -> IO (IOUArray (Int, Int) Bool)
memoize n d memo x
  | x - d >= (-size) && x + d <= size = do
    a <- readArray memo (n-1, x-d)
    b <- readArray memo (n-1, x+d)
    writeArray memo (n, x) $ a || b
    return memo
  | x - d >= (-size) = do
    a <- readArray memo (n-1, x-d)
    writeArray memo (n, x) a
    return memo
  |  x + d <= size = do
    b <- readArray memo (n-1, x+d)
    writeArray memo (n, x) b
    return memo
  | otherwise = do
    return memo
