h, w, n = gets.split.map(&:to_i)
sr, sc = gets.split.map(&:to_i)
s = gets.chomp
t = gets.chomp

step_l = 0
step_r = 0
step_u = 0
step_d = 0
flag = true
for i in 0...n do
  case s[i]
  when "L"
    step_l += 1
    if sc - step_l <= 0
      flag = false
      break
    end
  when "R"
    step_r += 1
    if sc + step_r > w
      flag = false
      break
    end
  when "U"
    step_u += 1
    if sr - step_u <= 0
      flag = false
      break
    end
  when "D"
    step_d += 1
    if sr + step_d > h
      flag = false
      break
    end
  end
  case t[i]
  when "L"
    if sc + step_r > 1
      step_r -= 1
    end
  when "R"
    if sc - step_l < w
      step_l -= 1
    end
  when "U"
    if sr + step_d > 1
      step_d -= 1
    end
  when "D"
    if sr - step_u < h
      step_u -= 1
    end
  end
end

puts flag ? "YES" : "NO"
