//Love and Freedom.
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#define ll long long
#define inf 20021225
#define N 2000010
using namespace std;
char s[N],t[N]; int s1,s2,h,w,n;
int main()
{
	scanf("%d%d%d",&h,&w,&n);
	scanf("%d%d",&s1,&s2);
	scanf("%s",s+1);scanf("%s",t+1);// printf("%s",t+1);
	int su=s1,sd=s1,sl=s2,sr=s2,i;
	for(i=1;i<=n;i++)
	{
		if(s[i]=='U')	su--;
		if(s[i]=='D')	sd++;
		if(s[i]=='L')	sl--;
		if(s[i]=='R')	sr++;
	//	printf("%d %d %d %d\n",su,sd,sl,sr);
		if(su==0)	break;
		if(sd>h)	break;
		if(sl==0)	break;
		if(sr>w)	break;
	//	printf("%d %c\n",t[i]);
		if(t[i]=='U' && sd>1)	sd--;
		if(t[i]=='D' && su<h)	su++;
		if(t[i]=='L' && sr>1)	sr--;
		if(t[i]=='R' && sl<w)	sl++;
	}
	if(i<=n)	printf("NO\n");
	else	printf("YES\n");
	return 0;
}
