var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var h = o.a();
  var w = o.a();
  var n = o.a();
  var sy = o.a();
  var sx = o.a();
  var s = o.a(1);
  var t = o.a(1);
  var l = 1, r = w, u = 1, d = h;
  var L = "L", R = "R", U = "U", D = "D";
  for(var i = n-1; i >= 0; i--){
    switch(t[i]){
      case L: r = Math.min(r+1, w); break;
      case R: l = Math.max(l-1, 1); break;
      case U: d = Math.min(d+1, h); break;
      case D: u = Math.max(u-1, 1);
    }
    switch(s[i]){
      case L: l++; break;
      case R: r--; break;
      case U: u++; break;
      case D: d--;
    }
    if(u > d || l > r)return "NO";
  }
  if(sy < u || sy > d || sx < l || sx > r)return "NO";
  return "YES"
}