#NOT嘘
H,W,N = gets.split.map(&:to_i)
sr,sc = gets.split.map(&:to_i)
l,r,u,d = 1,W,1,H
S = gets.chomp
T = gets.chomp

(N-1).downto(0) do |i|
  if i <= N-2
    c = T[i]
    if c == "L"
      r += 1 if r < W
    elsif c == "R"
      l -= 1 if l > 1
    elsif c == "U"
      d += 1 if d < H
    elsif c == "D"
      u -= 1 if u > 1
    end
  end

  c = S[i]
  if c == "L"
    l += 1
  elsif c == "R"
    r -= 1
  elsif c == "U"
    u += 1
  elsif c == "D"
    d -= 1
  end

  #p [l,r,u,d]
  if l > r || u > d
    puts "NO"
    exit
  end

end
puts (l <= sc && sc <= r && u <= sr && sr <= d) ? "YES" : "NO"
