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


(N-1).downto do |i|
  c = S[i]
  if c == "L"
    l -= 1
  elsif c == "R"
    r += 1
  elsif c == "U"
    u -= 1
  elsif c == "D"
    d += 1
  end

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

  c = T[i]
  if c == "L"
    r -= 1 if r > 1
  elsif c == "R"
    l += 1 if l < W
  elsif c == "U"
    d += 1 if d < H
  elsif c == "D"
    u -= 1 if u > 1
  end

  #p [l,r,u,d]
end
puts "YES"
