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

left = 1
right = W
up = 1
down = H

(N - 1).downto(0) do |i|
  s = S[i]
  t = T[i]

  if i < N - 1
    case t
    when 'R'
      left = [1, left - 1].max
    when 'L'
      right = [W, right + 1].min
    when 'U'
      down = [H, down + 1].min
    when 'D'
      up = [1, up - 1].max
    end
  end

  case s
  when 'R'
    right -= 1
  when 'L'
    left += 1
  when 'U'
    up += 1
  when 'D'
    down -= 1
  end

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

if left <= SC && SC <= right && up <= SR && SR <= down
  puts 'YES'
else
  puts 'NO'
end
