import Data.Maybe (mapMaybe, isNothing)


main :: IO()
main = do
    [h, w, n] <- map read . words <$> getLine
    [sr, sc] <- map read . words <$> getLine
    s <- getLine
    t <- getLine
    let onon = foldl (oo (h, w, sr, sc)) (Just (0, 0, 0, 0)) $ zip s t
    if isNothing onon then print "NO" else print "YES"
    where oo (h, w, sr, sc) (Just (a, b, c, d)) (x, y) =
            aa x (h, w, sr, sc) (a, b, c, d) >>= bb y (h, w, sr, sc)
          oo _ Nothing _ = Nothing
          aa 'L' (h, w, sr, sc) (a, b, c, d) = if a + 1 > sr
                                               then Nothing
                                               else Just (a + 1, b, c, d)
          aa 'R' (h, w, sr, sc) (a, b, c, d) = if b + 1 > w - sr
                                               then Nothing
                                               else Just (a, b + 1, c, d)
          aa 'U' (h, w, sr, sc) (a, b, c, d) = if c + 1 > sc
                                               then Nothing
                                               else Just (a, b, c + 1, d)
          aa 'D' (h, w, sr, sc) (a, b, c, d) = if d + 1 > h - sc
                                               then Nothing
                                               else Just (a, b, c, d + 1)
          bb 'L' (h, w, sr, sc) (a, b, c, d) = if b - 1 < sr - w
                                               then Just (a, b, c, d)
                                               else Just (a, b - 1, c, d)
          bb 'R' (h, w, sr, sc) (a, b, c, d) = if a - 1 > sr
                                               then Just (a, b, c, d)
                                               else Just (a - 1, b, c, d)
          bb 'U' (h, w, sr, sc) (a, b, c, d) = if d - 1 < sc - h
                                               then Just (a, b, c, d)
                                               else Just (a, b, c, d - 1)
          bb 'D' (h, w, sr, sc) (a, b, c, d) = if c - 1 > sc
                                               then Just (a, b, c, d)
                                               else Just (a, b, c - 1, d)