using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCorder
{
	public class Program
	{
		static void Main(string[] args)
		{
			B();
		}

		public static void B()
		{
			Scanner cin = new Scanner();
			int h = cin.Int();
			int w = cin.Int();
			int n = cin.Int();
			int ih = cin.Int();
			int iw = cin.Int();

			string taka = cin.Next();
			string aoki = cin.Next();

			int tlmax = 0;
			int trmax = 0;
			int tumax = 0;
			int tdmax = 0;
			int almax = 0;
			int armax = 0;
			int aumax = 0;
			int admax = 0;
			for (int i = 0; i < n; ++i) {
				switch (taka[i]) {
					case 'L':
						++tlmax;
						break;
					case 'R':
						++trmax;
						break;
					case 'U':
						++tumax;
						break;
					case 'D':
						++tdmax;
						break;
				}

				switch (aoki[i]) {
					case 'L':
						++almax;
						break;
					case 'R':
						++armax;
						break;
					case 'U':
						++aumax;
						break;
					case 'D':
						++admax;
						break;
				}
			}

			int tl = tlmax;
			int tr = trmax;
			int tu = tumax;
			int td = tdmax;
			int al = almax;
			int ar = armax;
			int au = aumax;
			int ad = admax;
			int tlc = 0;
			int trc = 0;
			int tuc = 0;
			int tdc = 0;
			int alc = 0;
			int arc = 0;
			int auc = 0;
			int adc = 0;
			for (int i = 0; i < n; ++i) {
				switch (taka[i]) {
					case 'L':
						++tlc;
						if (iw - tlc + arc <= 0) {
							Console.WriteLine("NO");
							return;
						}
						--tl;
						break;
					case 'R':
						++trc;
						if (iw + trc - alc > w) {
							Console.WriteLine("NO");
							return;
						}
						--tr;
						break;
					case 'U':
						++tuc;
						if (ih - tuc + adc <= 0) {
							Console.WriteLine("NO");
							return;
						}
						--tu;
						break;
					case 'D':
						++tdc;
						if (ih + tdc - auc > h) {
							Console.WriteLine("NO");
							return;
						}
						--td;
						break;
				}

				switch (aoki[i]) {
					case 'L':
						if (iw + tr + trc - alc> w && iw + trc - alc - 1 > 0) {
							++alc;
						}
						--al;
						break;
					case 'R':
						if (iw - tl - tlc + arc <= 0 && iw - tlc + arc + 1 <= w) {
							++arc;
						}
						--ar;
						break;
					case 'U':
						if (ih + td + tdc - auc > h && ih + tdc - auc - 1 > 0) {
							++auc;
						}
						--au;
						break;
					case 'D':
						if (ih - tu - tuc + adc <= 0 && ih - tuc + adc + 1 <= h) {
							++adc;
						}
						--ad;
						break;
				}
			}

			Console.WriteLine("YES");
		}
	}

	public class Scanner
	{
		string[] s;
		int i;

		char[] cs = new char[] { ' ' };

		public Scanner()
		{
			s = new string[0];
			i = 0;
		}

		public string Next()
		{
			if (i < s.Length) return s[i++];
			string st = Console.ReadLine();
			while (st == "") st = Console.ReadLine();
			s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
			if (s.Length == 0) return Next();
			i = 0;
			return s[i++];
		}

		public int Int()
		{
			return int.Parse(Next());
		}
		public int[] ArrayInt(int N, int add = 0)
		{
			int[] Array = new int[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Int() + add;
			}
			return Array;
		}

		public long Long()
		{
			return long.Parse(Next());
		}

		public long[] ArrayLong(int N, long add = 0)
		{
			long[] Array = new long[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Long() + add;
			}
			return Array;
		}

		public double Double()
		{
			return double.Parse(Next());
		}


		public double[] ArrayDouble(int N, double add = 0)
		{
			double[] Array = new double[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Double() + add;
			}
			return Array;
		}
	}
}


Measured memory_bytes: 14048