{-# LANGUAGE BangPatterns #-}
import Control.Arrow
import Control.Monad.Fix
import Data.Foldable
import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VMM
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VM
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Internal (accursedUnutterablePerformIO)
import qualified Data.Set as S
import System.IO.Unsafe
import Debug.Trace

unew :: VU.Unbox a => Int -> VM.IOVector a
unew !n = accursedUnutterablePerformIO $ VM.unsafeNew n

uread :: VU.Unbox a => Int -> VM.IOVector a -> a
uread !i !v = accursedUnutterablePerformIO $ VM.unsafeRead v i

uwrite :: VU.Unbox a => Int -> a -> VM.IOVector a -> VM.IOVector a
uwrite !i !a !v =
  accursedUnutterablePerformIO $ VM.unsafeWrite v i a >> return v

umodify :: VU.Unbox a => Int -> (a -> a) -> VM.IOVector a -> VM.IOVector a
umodify !i !f !v =
  accursedUnutterablePerformIO $ VM.unsafeModify v f i >> return v

uthaw :: VU.Unbox a => VU.Vector a -> VM.IOVector a
uthaw !v = accursedUnutterablePerformIO $ VU.unsafeThaw v

ufreeze :: VU.Unbox a => VM.IOVector a -> VU.Vector a
ufreeze !v = accursedUnutterablePerformIO $ VU.unsafeFreeze v

solve :: Int -> Int -> B.ByteString -> Bool
solve x y bs =
  foldl' go dpX rx VU.! toIndex x && foldl' go dpY ry VU.! toIndex y
 where
  go !prev !i = VU.fromList
    [ (if (k + i) < maxN then prev VU.! toIndex (k + i) else False)
        || (if (k - i) >= -maxN then prev VU.! toIndex (k - i) else False)
    | k <- [-maxN .. maxN]
    ]

  maxN = B.length bs
  dpX  = VU.fromList [ i == rx0 | i <- [-maxN .. maxN] ]
  dpY  = VU.fromList [ i == 0 | i <- [-maxN .. maxN] ]

  toIndex k = k + maxN

  (rx0, rx, ry) =
    let
      (bs0, bs1)     = B.span (== 'F') bs
      (rx, ry, _, _) = if B.length bs1 == 0
        then ([], [], B.empty, 0)
        else fix
          (\f (!rx, !ry, !bs, !parity) ->
            let (bs0, bs1) = B.span (== 'F') bs
                r          = B.length bs0
                next       = if B.length bs1 == 0 then id else f
                bs1'       = if B.length bs1 == 0 then B.empty else B.tail bs1
                cons       = if r > 0 then (r :) else id
            in  if parity == 0
                  then next $ (cons rx, ry, bs1', 1)
                  else next $ (rx, cons ry, bs1', 0)
          )
          ([], [], B.tail bs1, 1)
    in
      (B.length bs0, rx, ry)

main = do
  let readInt = fmap (second B.tail) . B.readInt

  bs     <- B.getLine
  (x, y) <-
    (\vec -> (vec VU.! 0, vec VU.! 1)) . VU.unfoldrN 2 readInt <$> B.getLine
  putStrLn $ if solve x y bs then "Yes" else "No"
