import Control.Monad
import Data.Bool
 
main = do
  s <- getLine
  [x, y] <- map read . words <$> getLine
  putStr $ solve s x y
 
solve s x y = judge $ move x y s
 
move x y [] = [(0, 0, x, y)]
move x y (c:cs) = (move x y cs) >>= step c
 
step 'F' (x, y, z, w) = [(x + 1, y, z, w)]
step 'T' (x, y, z, w) = [(-y, x, -w, z), (y, -x, w, -z)]
 
judge = bool "No" "Yes" any goal
 
goal (x, y, z, w) = (x, y) == (z, w)