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
  f 'L' (l,r,u,d)
    | l < r = Just (l+1,r,u,d)
    | l == r = Nothing
  f 'R' (l,r,u,d)
    | l < r = Just (l,r-1,u,d)
    | l == r = Nothing
  f 'U' (l,r,u,d)
    | u < d = Just (l,r,u+1,d)
    | u == d = Nothing
  f 'D' (l,r,u,d)
    | u < d = Just (l,r,u,d-1)
    | u == d = Nothing
  g 'L' (l,r,u,d) = Just (l,min w (r+1),u,d)
  g 'R' (l,r,u,d) = Just (max 0 (l-1),r,u,d)
  g 'U' (l,r,u,d) = Just (l,r,u,min h (d+1))
  g 'D' (l,r,u,d) = Just (l,r,max 0 (u-1),d)