H, W, N = gets.split.map(&:to_i)
SR, SC = gets.split.map(&:to_i)
S = gets.chomp.chars
T = gets.chomp.chars

RR = Array.new(N, 0)
rr = 0
LL = Array.new(N, 0)
ll = 0
UU = Array.new(N, 0)
uu = 0
DD = Array.new(N, 0)
dd = 0

(N - 1).downto(1) do |i|
  case S[i]
  when 'R'
    rr += 1
  when 'L'
    ll += 1
  when 'U'
    uu += 1
  when 'D'
    dd += 1
  end

  RR[i] = rr
  LL[i] = ll
  UU[i] = uu
  DD[i] = dd
  RR[i - 1] = RR[i]
  LL[i - 1] = LL[i]
  UU[i - 1] = UU[i]
  DD[i - 1] = DD[i]

  case T[i]
  when 'L'
    rr -= 1
  when 'R'
    ll -= 1
  when 'D'
    uu -= 1
  when 'U'
    dd -= 1
  end
end

up = down = SR
left = right = SC

S.zip(T).each_with_index do |(s, t), i|
  case s
  when 'R'
    right += 1
  when 'L'
    left -= 1
  when 'U'
    up -= 1
  when 'D'
    down += 1
  end

  if left < 1 || up < 1 || W < right || H < down
    puts 'NO'
    exit
  end

  case t
  when 'R'
    left = [N - RR[i], left + 1].min
  when 'L'
    right = [1 + LL[i], right - 1].max
  when 'U'
    down = [1 + UU[i], down - 1].max
  when 'D'
    up = [N - DD[i], up + 1].min
  end
end

puts 'YES'
