using System;
using System.Collections.Generic;
using System.Linq;
using BitArray = System.Collections.BitArray;
using BigInteger = System.Numerics.BigInteger;

namespace AtCoderProject
{
    struct Index : IEquatable<Index>
    {
        public int h;
        public int w;
        public Index(int i, int j)
        {
            this.h = i;
            this.w = j;
        }

        public bool Equals(Index other) => this.h == other.h && this.w == other.w;
    }
    public class Program
    {
        public static string WriteBoard(bool[,,] board, int i, int H, int W)
        {
            var sb = new System.Text.StringBuilder();
            for (int h = 0; h < H; h++)
            {
                for (int w = 0; w < W; w++)
                    sb.Append(board[i, h, w] ? 'Y' : 'N');
                sb.AppendLine();
            }
            return sb.ToString();
        }
        public object Calc()
        {
            var line = consoleReader.SplitInt32();
            var H = line[0];
            var W = line[1];
            var N = line[2];

            line = consoleReader.SplitInt32();
            var sr = line[0];
            var sc = line[1];

            var S = consoleReader.String();
            var T = consoleReader.String();

            int right = W;
            int left = -1;
            int lower = H;
            int upper = -1;

            for (int i = N - 1; i >= 0; i--)
            {
                switch (T[i])
                {
                    case 'L':
                        if (right > 0)
                            right++;
                        break;
                    case 'R':
                        if (left < W - 1)
                            left--;
                        break;
                    case 'U':
                        if (lower > 0)
                            lower++;
                        break;
                    case 'D':
                        if (upper < H - 1)
                            upper--;
                        break;
                    default:
                        break;
                }
                switch (S[i])
                {
                    case 'L':
                        if (left < 0)
                            left = 0;
                        else
                            left++;
                        break;
                    case 'R':
                        if (right >= W)
                            right = W - 1;
                        else
                            right--;
                        break;
                    case 'U':
                        if (upper < 0)
                            upper = 0;
                        else
                            upper++;
                        break;
                    case 'D':
                        if (lower >= H)
                            lower = H - 1;
                        else
                            lower--;
                        break;
                    default:
                        break;
                }
            }
            return sr - 1 <= upper || lower <= sr - 1 || sc - 1 <= left || right <= sc - 1 ? "NO" : "YES";
        }

        const int mod = 1000000007;
        private readonly ConsoleReader consoleReader;
        public Program() : this(new ConsoleReader()) { }
        public Program(ConsoleReader consoleReader) { this.consoleReader = consoleReader; }
        static void Main() => Console.WriteLine(new Program().Calc());
    }

    public class ConsoleReader
    {
        public virtual string String() => Console.ReadLine();
        public int Int32() => int.Parse(String());
        public long Int64() => long.Parse(String());
        public ulong UInt64() => ulong.Parse(String());
        public double Double() => double.Parse(String());
        public string[] Split() => String().Split().ToArray();
        public int[] SplitInt32() => String().Split().Select(s => int.Parse(s)).ToArray();
        public long[] SplitInt64() => String().Split().Select(s => long.Parse(s)).ToArray();
        public ulong[] SplitUInt64() => String().Split().Select(s => ulong.Parse(s)).ToArray();
        public double[] SplitDouble() => String().Split().Select(s => double.Parse(s)).ToArray();

        public IEnumerable<string> Repeat(int count)
        {
            for (int i = 0; i < count; i++)
                yield return String();
        }
        public IEnumerable<int> RepeatInt32(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Int32();
        }
        public IEnumerable<long> RepeatInt64(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Int64();
        }
        public IEnumerable<string[]> RepeatSplit(int count)
        {
            for (int i = 0; i < count; i++)
                yield return Split();
        }
        public IEnumerable<int[]> RepeatSplitInt32(int count)
        {
            for (int i = 0; i < count; i++)
                yield return SplitInt32();
        }
    }
    static class DicExt
    {
        public static V GetOrDefault<K, V>(this Dictionary<K, V> dic, K key, V defaultValue = default(V))
        {
            V val;
            return dic.TryGetValue(key, out val) ? val : defaultValue;
        }
    }
}


Measured memory_bytes: 14432