g :: Int ->[Int] -> [Int]-> Bool
g n [a,b] [c,d] = case mod n 4 of 0 -> if b<d then True else False
                                  1 -> if a<c then True else False
                                  2 -> if b<d then True else False
                                  3 -> if a<c then True else False
                                  

f :: String -> Int -> [Int] -> [Int] -> String
f l d [n,m] [a,b] = if null l then if [a,b]==[n,m] then"Yes"else"No"
                     else if (head l)=='T' then if g d [n,m] [a,b] then f (tail l) (d+1) [n,m] [a,b] else f (tail l) (d-1) [n,m] [a,b]
                           else case (mod d 4) of 0 -> f (tail l) d [n,m] [a+1,b] 
                                                  1 -> f (tail l) d [n,m] [a,b+1]
                                                  2 -> f (tail l) d [n,m] [a-1,b]
                                                  3 -> f (tail l) d [n,m] [a,b-1]
 
main=do
 l<-getLine
 [a,b]<-map read.words<$>getLine
 putStrLn$f l 0 [a,b] [0,0]