import Data.Bool

main = do
  [h,w,n] <- map read.words<$>getLine
  [sr,sc] <- map read.words<$>getLine
  s <- getLine
  t <- getLine
  putStrLn $ bool "NO" "YES" $ solve h w n sr sc s t

solve h w n sr sc s t = eval $ go s t where
  eval Nothing = False
  eval (Just (l,r,u,d))
    = l<=sc && sc<=r && u<=sr && sr<=d
  go [] [] = Just (1,w,1,h)
  go (s:ss) (t:tt) = go ss tt >>= g t >>= f s
  mov (dl,dr,du,dd) (l0,r0,u0,d0)
    | l > r || u > d = Nothing
    | otherwise = Just (max 1 l, min w r, max 1 u, min h d)
    where (l,r,u,d) = (l0+dl,r0+dr,u0+du,d0+dd)
  f 'L' = mov ( 1, 0, 0, 0)
  f 'R' = mov ( 0,-1, 0, 0)
  f 'U' = mov ( 0, 0, 1, 0)
  f 'D' = mov ( 0, 0, 0,-1)
  g 'L' = mov ( 0, 1, 0, 0)
  g 'R' = mov (-1, 0, 0, 0)
  g 'U' = mov ( 0, 0, 0, 1)
  g 'D' = mov ( 0, 0,-1, 0)