import std.stdio, std.conv, std.string;
import std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

int DEBUG_LEVEL = 0;
void print()(){ writeln(""); }
void print(T, A ...)(T t, lazy A a){ write(t), print(a); }
void print(int level, T, A ...)(T t, lazy A a){ if(level <= DEBUG_LEVEL) print(t, a); }

void main(string[] args){
	if(args.length > 1 && args[1] == "-debug"){
		if(args.length > 2 && args[2].isNumeric) DEBUG_LEVEL = args[2].to!int;
		else DEBUG_LEVEL = 1;
	}
	
	// ----------------------------------------
	
	int h = read.to!int;
	int w = read.to!int;
	int n = read.to!int;
	
	int i0 = read.to!int - 1;
	int j0 = read.to!int - 1;
	
	string s = readln.chomp;
	string t = readln.chomp;
	
	int l, r, u, d; // ここより外にいれば高橋君の勝ちという領域の幅
	
	string ans = "YES";
	
	foreach_reverse(k; 0 .. n){
		if(k < n - 1){
			if(t[k] == 'L') r = max(0, r - 1);
			if(t[k] == 'R') l = max(0, l - 1);
			if(t[k] == 'U') d = max(0, d - 1);
			if(t[k] == 'D') u = max(0, u - 1);
		}
		
		print!1("k:", k, " t[k]:", t[k], " l:", l, " r:", r, " u:", u, " d:", d);
		
		if(s[k] == 'L') l += 1;
		if(s[k] == 'R') r += 1;
		if(s[k] == 'U') u += 1;
		if(s[k] == 'D') d += 1;
	
		if(l + r >= w) ans = "NO";
		if(u + d >= h) ans = "NO";
		
		print!1("k:", k, " s[k]:", s[k], " l:", l, " r:", r, " u:", u, " d:", d);
	}
	
	if(l > j0) ans = "NO";
	if(r > w - 1 - j0) ans = "NO";
	if(u > i0) ans = "NO";
	if(d > h - 1 - i0) ans = "NO";
	
	ans.writeln;
	

}
